Introduction. Sleep quality is commonly impaired in medical disorders, and the HIV-positive population is particularly vulnerable to complaint from sleep disturbances. Objective. To determine the prevalence of poor sleep quality and the factors associated with it, in a population of HIV positive Mexican out patients. Method. A cross sectional study was done. A sample of 367 HIV-positive subjects over 18 years completed a set of self-administered questionnaires: the Pittsburgh Sleep Quality Index (PSQI), the Epworth Sleepiness Scale, the Athens Insomnia Scale, and the Beck Depression Inventory. Sociodemographic and clinical data were recorded. Results. Of the respondents, 82.8% (n = 304) were male. The mean age of the patients was 36.6 (SD = 9.4) years, and the mean educational level was 12.2 (SD = 3.8) years. According to the PSQI, 58.6% (n = 215) had poor sleep quality. Poor sleep quality was more common in those who had lived longer with HIV, had started their antiretroviral treatment later, had suboptimal antiretroviral adherence, had a CD4 cell count < 200 cells/µL, reported illicit drug use, had concomitant medications, or had insomnia, sleepiness, or depressive symptoms. In multivariate analyses, poor sleep quality was associated with depressive symptoms, illicit drug use, a CD4 count < 200 cells/µL, and time elapsed since HIV diagnosis. Discussion and conclusion. Poor sleep quality is common in HIV patients. Early identification of patients with poor sleep quality through vigilance for factors associated with it might facilitate prompt treatment.