Introduction: Depressive disorders can be defined as episodes of depressed mood or loss of interest and pleasure in nearly all activities. Depression is considered a major mental disorder in the elderly, and may be related to quality of sleep and living habits as well as being influenced by sociodemographic factors. Objective: To determine the prevalence of depression among the elderly in the north-east of Brazil, and the relationship between the condition and socio-demographic profile, quality of sleep and living habits. Method: An epidemiological cross-sectional study was performed of the elderly population of the urban area of Campina Grande, Paraiba. The dependent variable presence of depression and the independent variables sociodemographic aspects, sleep quality, and living habits were investigated. Estimates of the prevalence of the variables were obtained and association measured using Poisson Regression. A 5% significance level was adopted for the estimates. Results: The study included 168 elderly patients with a mean age of 72.3 (±7.8) years, most of whom, 122 (72.6%), were women. Depression was identified in 72 elderly persons (42.9%). Elderly women were twice as associated with depression (PR=2.26) as men. A subjective quality of sleep of very good (PR=0.34), medium/high risk of sleep disturbance (PR = 4.08), taking sleeping medications once or twice (PR=5.21) and three times or more (PR=8.69) a week, daytime dysfunction once or twice (PR=14.40) and three times or more (PR=27) a week and poor quality of sleep on the Pittsburgh index were associated with depression in bivariate analysis, although there was no relationship following multivariable adjustment. Conclusion: The prevalence of depression was high in the studied population, being noticeably more frequent among elderly woman. However, it was not possible to detect an association between depression and living habits and sleep quality.