Background. Data in the literature has shown poor sleep quality to be frequently observed in hospitalized patients and known to be associated with poor treatment outcome. Many factors may impact poor sleep quality, and there is currently limited available data. We aim to determine the prevalence of poor sleep quality and associated factors in patients admitted to internal medicine wards as well as the change of sleep quality over time after admission. Methods. An analytic observational study was conducted at the internal medicine wards at the King Chulalongkorn Memorial Hospital, Bangkok, Thailand. Patients were personally interviewed to evaluate the history of sleep quality at home, sleep quality after the first and the third days of admission, and potential associated factors. The Pittsburgh Sleep Quality Index and screening questionnaires for the common diseases associated with poor sleep quality were also utilized. The logistic regression analysis was used to determine the independent factors which led to poor sleep quality. Results. Data were collected from 96 patients during the period of June 2015 to February 2016. The mean age of the patients was 50.8±16.7 years, and 51% were male. Infectious disease was the most common principal diagnosis accounted for 29.2%. The results show high prevalence of poor sleep quality after the first night of admission compared to baseline sleep quality at home (50% vs. 18.8%; p<0.001). After 3 days of admission, the prevalence of poor sleep quality was reduced to the level close to baseline sleep quality at home (28.1% vs. 18.8%; p=0.13). Multivariate analysis demonstrated that light exposure and pain were the main independent factors for poor sleep quality on the first day (odds ratio 6.68; 95% CI 2.25-19.84) and on the third day (odds ratio 3.47; 95% CI 1.24-9.71), respectively. Conclusions. This is the first study conducted on the sleep quality of hospitalized patients that included the follow-up period during hospital admission. Our study demonstrated high prevalence of poor sleep quality in hospitalized patients on the first day. Interestingly, the sleep quality was partly improved during hospitalization. Light exposure and pain were demonstrated to be the factors associated with poor sleep quality.