Insomnia is an arising common health problem in Malaysia. There are many factors contributed to insomnia in young adults but very few are known. Increasing usage of social media may be one of the contributing factors to insomnia along its association with the sociodemographic factors. The objective of this study was to measure the prevalence of insomnia and to study its association with usage of social media and sociodemographic factors among university students. A cross-sectional based questionnaire was conducted among 445 students aged 18-30 years old in a private university in Selangor from July to August 2018. The questionnaire consisted of three parts to assess insomnia, social media usage and some socio-demographic factors. The age of the respondents ranged from 19 to 33 years old and the majority was relatable to insomnia (69%). The frequency of accessing social media was significantly associated with insomnia (p value=0.005). The time of the day of accessing social media mostly was significantly associated as well with insomnia, especially evening (p value=0.02), night time (p value=0.01) and before sleeping time (p value=0.04). The use of gadgets (phones/laptops/tablets) before sleeping at night also showed significant association with insomnia (p value=0.003). The sociodemographic factors (gender, age, race, income, relationship and living status) showed no significant association with insomnia. As a conclusion, the most influential factors that significantly associated to insomnia among students in a private university were the frequency of accessing social media, time of social media usage (the evening, night and before sleeping), and the usage of gadgets before sleeing on bed.