Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2025 Mar 24;15:10040. doi: 10.1038/s41598-025-93681-3

The mediating effects of sleep quality in the relationship between loneliness and depression among middle-aged and older adults

Yue Liu 1,2,#, Donglin Zhang 4,#, Linpeng Sui 1,2, Dan Li 3, Minjuan Wang 1,, Wenhua Wang 5, Mei Xue 1, Jianfeng Hao 3, Lei Zhang 5,7,, Mingyang Wu 6
PMCID: PMC11931007  PMID: 40122947

Abstract

Loneliness has long been recognized as a key predictor of depression in older adults, and both are related to sleep quality. However, to this day, less is known about whether sleep quality mediates their relationship. This study aimed to examine the relationship between loneliness, sleep quality, and depressive symptoms, and to further explore whether sleep quality mediates the relationship between loneliness and depressive symptoms. Using the random cluster sampling method, 1016 permanent residents aged 45 and above in Ankang City, Shaanxi Province were selected. The relationship between loneliness, sleep quality, and depressive symptoms was analyzed using binary logistic regression, and the mediating role of sleep quality between loneliness and depressive symptoms was analyzed using the PROCESS macro in SPSS 25.0 software. The average age of the participants in this study was 60.39 ± 8.50. Regression analyses showed that individuals with loneliness (OR 7.161, 95%CI: 4.889–10.490, P < 0.001) and those with poor sleep quality (OR 4.777, 95%CI: 3.301–6.913, P < 0.001) were more likely to experience depressive symptoms than individuals without loneliness and with good sleep quality. This study also found a significant mediating effect of sleep quality between loneliness and depressive symptoms [effect value = 0.066, bootstrap 95% CI: (0.037, 0.093)] with an effect size of 13.31%. Loneliness may lead to reduced sleep quality in individuals, which in turn may lead to or exacerbate depressive symptoms. Therefore, this study highlights the importance of assessing and improving sleep quality in lonely people.

Keywords: Depression, Loneliness, Sleep quality, Mediating effect, Middle and old adults

Subject terms: Quality of life, Human behaviour

Introduction

The Global Burden of Disease (GBD) Study 2021 report has highlighted that as of 2021, the number of individuals with depression worldwide has reached 332 million cases1. Projections suggest that by 2030, depression is poised to become the leading cause of the global disease burden2. Depression not only impairs cognitive function, increases the risk of dementia, and leads to disability but also poses the extreme consequences of suicide and death3,4. Against the backdrop of an aging population, depression poses a severe threat to the health, quality of life and survival of the elderly4. Studies indicate that over one-third of the global elderly population experiences depressive symptoms5. In China, the combined estimated prevalence of depression among the elderly is 20.0%6. Additionally, middle-aged individuals face increasing risks of depression due to parenting responsibilities, eldercare burdens, work-related stress, and anxiety regarding social status changes associated with aging and retirement7,8. Therefore, exploring the risk factors and underlying mechanisms of depressive symptoms in middle-aged and older adults is of urgent necessity.

With advancing age, the natural decline in physical function, increased disability, reduced social participation, and experiences of major life events such as widowhood significantly increase older adults’ susceptibility to loneliness9,10. Loneliness is a complex subjective emotional experience that occurs when an individual perceives that their social needs remain unmet in terms of either the quantity or quality of social relationships11,12. It can be categorized into emotional loneliness (resulting from a lack of emotional connection due to insufficient intimate relationships) and social loneliness (stemming from difficulties in achieving the desired sense of social belonging during actual social interactions)13. Longitudinal studies have demonstrated a significant positive correlation between loneliness and subsequent depression in older adults14. A study from Japan showed that both social and emotional loneliness have a significant positive predictive effect on depressive symptoms among participants15. The loneliness model proposed by Hawkley et al. may elucidate the underlying mechanism of this association: when an individual perceives social isolation, the subconscious becomes overly vigilant to social threats or dangers. In this state, individuals are prone to cognitive biases, excessive focus on negative social information, and subsequent social withdrawal. This withdrawal behavior further exacerbates the individual’s isolated state, triggering a series of negative emotions such as pessimism, stress, anxiety, and hostility, thereby affecting mental health16. From the perspective of brain functional connectivity and neural networks, loneliness and depression share a unique link in the processing of negative emotions17. Individuals with experiences of loneliness often struggle to effectively regulate negative emotions, easily falling into pessimistic states characterized by decreased self-esteem, diminished self-worth, self-mockery, and self-loathing, which in turn promote the development of depressive symptoms18.

Sleep is a critical process for physiological restoration in the body and is closely related to emotional regulation, cognitive function, and mental health19. High-quality sleep is essential for the process of sleep recovery 16. Studies have shown that loneliness can impair sleep quality, leading to daytime dysfunction such as fatigue and low energy. Poor sleep quality, in turn, further exacerbates loneliness, creating a vicious cycle16. A study from Sweden demonstrated that individuals who experience loneliness repeatedly face a higher risk of sleep disorders, with loneliness serving as a predictor of sleep disorder onset20. Meanwhile, sleep disorders interact with depression and are among the strongest predictors of depression onset2123. Therefore, we hypothesize that sleep quality may mediate the transition from loneliness to depression.

Existing studies have shown that sleep quality plays a mediating role between perceived stress and depression as well as between loneliness and cognitive function24,25. However, most studies have focused only on the relationships between two of these factors, with few exploring the associations among all three. Moreover, these studies often have small sample sizes and lack consistent conclusions26,27. Therefore, this study aims to investigate the impact of loneliness on depressive symptoms and to validate the mediating role of sleep quality. This will help elucidate the underlying mechanisms through which loneliness leads to depression and provide a scientific basis for healthcare providers, eldercare service workers, and social workers to design effective preventive measures against loneliness and depression in middle-aged and older adults.

Methods

Sample and data collection

This cross-sectional study was conducted in Shaanxi Province, China, from July to August 2023. We employed a random cluster sampling method to obtain a representative sample. Ankang City was randomly selected within Shaanxi Province, followed by the random selection of two counties, Zhenping and Hanbin. Community service centers in these counties were designated as survey sites and residents meeting inclusion/exclusion criteria were surveyed. The survey team, consisting of physicians and medical students, conducted the study; physicians used the Inbody body composition analyzer to determine participants’ Body Mass Index (BMI), while medical students, working in groups, administered the questionnaire survey. All team members underwent standardized training one week before the survey’s commencement.

The questionnaire was administered through face-to-face interviews, with informed consent obtained from all participants. Interviewers guided participants through the questionnaire using a standardized script and assisted as needed. Each questionnaire took approximately 30 min to complete. It was collected immediately after completion. Individuals were included when they were aged 45 years and over, had lived in the area for over six months, and could cooperate with a comprehensive assessment. Participants were excluded if they had severe cognitive dysfunction or communication barriers that prevented participation, or a refusal to participate by them or their families.

From 1265 respondents, duplicates and cases with incomplete data on depression, loneliness, and sleep quality were excluded. Multiple imputation (n = 20) was used for covariates with missing data. 1016 individuals were included, resulting in an efficacy rate of 80.3%. Figure 1 details the process of participant recruitment.

Fig. 1.

Fig. 1

Flowchart of participant inclusion in this study.

The study was conducted following the ethical principles of the Declaration of Helsinki, and pre-survey approval was obtained from the Medical Ethics Review Committee of Xi’an Medical University (approval number: XYLS2023090).

Survey instruments

Center for Epidemiologic Studies Depression Scale—10-item version (CESD-10)

This study utilized the 10-item Center for Epidemiologic Studies Depression (CESD-10) scale28 to evaluate the severity of depressive symptoms. Participants rated the frequency of specific feelings and behaviors experienced within the last week on a four-point Likert scale: 0 (rarely/never), 1 (sometimes), 2 (often), and 3 (most of the time/all of the time). The items "I feel hopeful about the future" and "I am happy" were reverse-scored, with higher scores reflecting fewer depressive symptoms. The remaining items were scored conventionally. The total scale score ranges from 0 to 30. A cutoff of ≥ 10 on the CESD-10 was applied to identify participants with clinically significant depressive symptoms, a threshold with adequate predictive validity for diagnosing clinical depression28. This scale has demonstrated robust reliability and validity in Chinese adult populations, as confirmed by previous research29. In this study, the Cronbach’s α for the CESD-10 was 0.768.

The University of California, Los Angeles Loneliness Scale (ULS-8)

The ULS-8 scale30, comprised of items 2, 3, 9, 11, 14, 15, 17, and 18 from the revised University of California, Los Angeles Loneliness Scale (ULS-20), assesses loneliness with responses rated on a four-point scale: 1 (never), 2 (rarely), 3 (sometimes), and 4 (always). Items 3 “I am a person who enjoys making friends” and 18 “When I need to, I can find companionship” are reverse-scored. Scores range from 8 to 32, with higher scores reflecting increased loneliness; scores of 8 to 15 suggest no loneliness, while scores of 16 and above indicate its presence31. The ULS-8 has shown satisfactory discriminant validity and internal consistency, offering a reduced respondent burden compared to the ULS-20 without substantial loss of information. In this study, the Cronbach’s α for the ULS-8 was 0.714.

Pittsburgh Sleep Quality Index (PSQI)

The Pittsburgh Sleep Quality Index (PSQI)32 is an 18-item instrument to assess an individual’s sleep quality over the previous month. It assesses seven dimensions: subjective sleep quality, sleep latency, sleep duration, efficiency, disturbances, use of sleep medication, and daytime functional disturbances. Scores for each dimension range from 0 to 3, and total scores for all dimensions range from 0 to 21. The lower the total score of the PSQI, the better the sleep quality. A score of 7 or below indicates good sleep quality, while a score above 7 implies poor sleep quality. The reliability and validity of the PSQI have been well-established in Chinese populations.33 In this study, the Cronbach’s alpha for the PSQI was 0.736.

Covariates

The questionnaire collected the following covariates, including sociodemographic factors, lifestyle factors, and chronic disease conditions.

Sociodemographic factors

Age (years), gender, education level, occupation, marital status, family type, living situation, family adversities (whether experienced in the past year), hospitalization experience (whether had in the past year), and family per capita monthly income (in the past year).

Lifestyle and chronic disease conditions

Lifestyle: smoking, drinking status, and BMI. BMI is measured by a body composition analyzer (Inbody). Participants are measured while wearing light clothing and taking off their shoes. According to the results, it is defined as underweight (BMI < 18.5 kg/m2), normal weight group (18.5–23.9 kg/m2), overweight (BMI 24–27.9 kg/m2), and obesity (BMI ≥ 28 kg/m2).

Chronic disease conditions: Whether there has been a history of hypertension, diabetes, and coronary heart disease diagnosed by a doctor.

Statistical analysis

The statistical analysis software employed in this study is IBM SPSS version 25.0. Categorical data were described using frequencies and percentages, while continuous data, including CESD-10 scores, ULS-8 scores, PSQI scores, and age, which were skewed in distribution, were described using medians and quartiles (M [P25, P75]). Group comparisons regarding the presence of depressive symptoms were performed using Pearson’s chi-squared test and Mann–Whitney U test. Binary logistic regression analysis was used to assess the association between loneliness, poor sleep quality, and depressive symptoms, with the absence of loneliness and good sleep quality as references, and odds ratios (OR) and 95% confidence intervals (CI) were provided as estimates. Four regression models were established: Model 1 was a single-factor model. Model 2 was adjusted for age and gender. Model 3 was further adjusted for other demographic factors significant in univariate analysis (education level, occupation, marital status, living situation, average monthly household income, hospitalization history) and chronic disease conditions (hypertension, diabetes, coronary heart disease). Model 4 included adjustments for sleep quality or loneliness based on Model 3. Spearman’s correlation analysis was used to test the correlations among loneliness, sleep quality, and depression. Finally, the mediation effect of sleep quality was tested using Model 4 in the SPSS 25.0 macro program PROCESS version 4.034, with bias-corrected percentile Bootstrap method for mediation effect testing, and the Bootstrap resampling number was set to 5,000. A P-value of less than 0.05 was considered statistically significant.

Results

Participant characteristics

The supplementary table shows the baseline characteristics of participants according to the existence of depressive symptoms. A total of 1016 people were included in the study. Age ranged from 45 to 92 years with a median age of 60 (54, 67). There were 485 middle-aged people (47.7%) and 531 older people (52.3%). Of these, 675 were female (66.4%), 274 had no education (27%), and 572 worked in agriculture (56.3%). Depressive symptoms were reported by 212 participants (20.9%), 238 (23.4%) felt lonely and 346 (34.1%) reported poor sleep quality. See the supplementary table for more details.

Univariate analysis of depressive status in participants

Univariate analysis in the supplementary table indicates that loneliness, sleep quality are significantly correlated with the detection rate of depressive symptoms (P < 0.001). Among participants with feelings of loneliness, the detection rate of depressive symptoms is 49.2%, much higher than that of those without (12.2%). In participants with poor sleep quality, the detection rate is 39.9%, remarkably higher compared to those with good sleep quality (11.0%).

Among the covariates, family type, family adversities, smoking status, alcohol consumption status, and BMI have no significant association with the detection rate of depressive symptoms (P > 0.05). However, significant differences are observed in other factors. For example, the elderly group (23.7%), females (25.6%), Farmers (23.4%), widowed individuals (31.6%), those living alone (31.3%), as well as participants with low educational levels, low average monthly household income, and those suffering from hypertension, coronary heart disease, or diabetes, all show a higher detection rate of depressive symptoms. Please refer to the supplementary table for detailed information.

Association of loneliness and poor sleep quality with depressive symptoms

The associations among loneliness, poor sleep quality, and depressive symptoms are presented in Table 1. Four binary logistic regression models were constructed. Statistically significant covariates from the univariate analyses were stratified, with whether the participants had depressive symptoms serving as the dependent variable, and loneliness and sleep quality (dichotomous variables) as the independent variables. After adjusting for gender and age, participants with loneliness (OR: 6.983; 95% CI: 4.965–9.837) and those with poor sleep quality (OR: 4.778; 95% CI: 3.440–6.636) had an increased odds of experiencing depressive symptoms (Table 1, Model 2). After further adjusting for factors such as educational level, occupation, marital status, place of residence, monthly per capita household income, hospitalization experience, hypertension, diabetes, coronary heart disease, as well as sleep quality or loneliness, similar associations between loneliness, poor sleep quality, and the occurrence of depressive symptoms were observed (Table 1, Model 4).

Table 1.

Association of loneliness and sleep disorders with depressive symptoms.

Variables Model Depressive symptom
OR (95%CI) P
Loneliness Model1 6.952 (4.985–9.695)  < 0.001
Model2 6.983 (4.956–9.837)  < 0.001
Model3 6.714 (4.715–9.562)  < 0.001
Model4 7.161 (4.889–10.490)  < 0.001
Sleep quality Model1 5.344 (3.867–7.385)  < 0.001
Model2 4.778 (3.440–6.636)  < 0.001
Model3 4.610 (3.294–6.453)  < 0.001
Model4 4.777 (3.301–6.913)  < 0.001

Notes:

Model 1: Unadjusted model.

Model 2: Adjusted for age (continuous variable) and gender.

Model 3: Adjusted for education level, occupation, marital status, living situation, average monthly household income, hospitalization history, hypertension, diabetes, and coronary heart disease, in addition to the covariates in Model 2.

Model 4: Adjusted for sleep disorders or loneliness, in addition to the covariates in Model 3.

Correlations of depression, loneliness, and sleep quality

Table 2 presents the correlations between depression, loneliness, and sleep quality among participants. The median loneliness score was 13 [10, 15], the median depression score was 6 [3, 9], and the median sleep quality score was 6 [4, 9]. Spearman’s correlation analysis revealed positive correlations between loneliness and depression scores (r = 0.449, P < 0.01), sleep quality and depression scores (r = 0.486, P < 0.01), and between loneliness and sleep quality scores (r = 0.139, P < 0.01).

Table 2.

Descriptive statistics and Spearman correlation analysis of variables in the mediation model.

M [Q1, Q3] Depression Loneliness Sleep quality
Depression 6 [3, 9] 1
Loneliness 13 [10, 15] 0.449** 1
Sleep quality 6 [4, 9] 0.486** 0.139** 1

Notes: **P < 0.01.

The mediating role of sleep quality between loneliness and depressive symptoms among middle-aged and older adults.

Tables 3 and 4, and Fig. 2, show the outcomes of the mediation analysis using model 4 in the PROCESS 4.0 macro. The CESD-10, ULS-8, and PSQI raw continuous scores were standardized and included in the mediation model. The findings indicate that, after controlling for sociodemographic factors, lifestyle, and chronic disease covariates, the total effect of the model was 0.496 (c = ab + c'). The direct effect of loneliness on depressive symptoms was significantly 0.430 (c'), accounting for 86.69% of the total effect. To assess the magnitude of the indirect effect, the Bootstrap method was employed for mediation testing, with 5000 resampled datasets from the original data. The results showed that the indirect effect (a*b) was 0.066 (Bootstrap 95% CI = [0.037, 0.093]). The 95% CI for the indirect effect of sleep quality did not include 0, indicating a partial mediating role of sleep quality between loneliness and depressive symptoms. The mediation effect was 13.31% (a*b/c).

Table 3.

The mediating effect of sleep quality between loneliness and depressive symptoms.

Model Outcome variable Independent variables β SE t P
Model I Depression Loneliness 0.496 0.026 18.845  < 0.001
R 0.593
R2 0.352
F 31.831
P  < 0.001
Model II Sleep quality Loneliness 0.161 0.031 5.200  < 0.001
R 0.341
R2 0.116
F 7.721
P  < 0.001
Model III Depression Loneliness 0.430 0.023 18.373  < 0.001
Sleep quality 0.408 0.024 17.225  < 0.001
R 0.707
R2 0.500
F 55.452
P  < 0.001

Notes:

Model 1: Loneliness predicts depressive symptoms.

Model 2: Loneliness predicts sleep quality.

Model 3: Sleep Quality and Loneliness Combined Predict Depressive Symptoms.

The mediation model was adjusted for sociodemographic factors (age, gender, education level, occupation, marital status, family type, living situation, per capita monthly household income, family adversities in the last year, hospitalization experience), lifestyle factors (smoking status, drinking status, BMI), and chronic disease conditions (hypertension, diabetes, coronary heart disease).

Table 4.

Total, direct, and indirect effects in the mediation model (N = 1016).

Pathway β SE LL95%CI UL95%CI % Mediated
Total effect 0.496 0.026 0.444 0.547 13.306
Direct effect 0.430 0.023 0.384 0.476
Indirect effect 0.066 0.014 0.037 0.093

Notes: LL95% CI stands for the lower 95% confidence interval limit, and UL95% CI stands for the upper 95% confidence interval. The percentage of mediation (% Mediated) is computed as the ratio of the indirect effect to the total effect.

Fig. 2.

Fig. 2

Mediation path diagram of loneliness, sleep quality, and depression. Note: *** indicates p < 0.001. Path c: The total effect of loneliness on depressive symptoms; Path a: The direct association between loneliness and sleep quality; Path b: The association between sleep quality and depressive symptoms; Path c’: The direct effect of loneliness on depressive symptoms after accounting for the mediating effect of sleep quality.

Discussion

In this study, we found that after adjusting for socio-demographic, health status, and lifestyle factors, loneliness and poor sleep quality were independent risk factors for depressive symptoms among participants. Additionally, our findings reveal the mediating role of sleep quality between loneliness and depressive symptoms, offering new insights into the mechanisms by which loneliness may lead to depression.

The overall prevalence of depressive symptoms among middle-aged and older adults in this study was 20.9%, which is lower than the 23.61% reported by NianWei et al.35 using data from the 2018 CHARLS. Among those aged 60 and above, the prevalence of depressive symptoms was 23.7%, higher than the rates found by Wang et al.36 in their surveys of Liaoning Province (18.17%), Henan Province (18.87%), and Guangdong Province (9.93%) in China. The higher prevalence of depressive symptoms among the aged 60 and above in this study, compared to those provinces, in addition to differences in assessment tools. Socioeconomic inequalities often lead to disparities in health and healthcare utilization37. Over half of the subjects in this study were farmers, indicating a generally lower economic status among the study population. Consequently, the prevalence of depressive symptoms is relatively high in this particular group.

Furthermore, in the univariate analysis, the elderly compared to the middle-aged, women, those who are widowed, living alone, have a lower level of education, lower household monthly income, and suffer from hypertension, diabetes, and coronary heart disease, were found to be at a higher risk of depression. The potential mechanisms for late-life depression include increased chronic inflammation, HPA-axis dysregulation, reduced neurotrophic factor production, and β-amyloid accumulation38. From adolescence to menopause, hormonal fluctuations in women, especially estrogen withdrawal, make them more prone to depression than men39. A Japanese study found that living alone and being widowed increases depression risk, and our study concurs40. Living alone reduces family interactions, leading to social isolation, loneliness, and thus a higher depression risk41. Losing a spouse, key emotional support, breaks an emotional bond, leaving individuals vulnerable to loneliness, pain, and depression42,43. Longitudinal research indicates that lower socioeconomic status signals a higher depression risk44. Lower education can limit career growth, resulting in low-paying, high-stress, and unstable jobs, lowering living standards, causing stress, and raising depression risk. A Chinese prospective study confirmed a significant link between chronic diseases and depression, with mobility issues, ADL (activities of daily living) limitations, chronic pain, and sleep quality mediating this relationship45. Regarding BMI and depression, prior research has inconsistent results. One study has shown that being underweight (BMI < 18.5 kg/m2) or obese (BMI > 30 kg/m2) increases the risk of depression, in other words, a U-shaped association between BMI and depression levels46. However, other studies only show a link between obesity and depression47. In this study, there was no significant association between BMI levels and depressive symptoms, which is consistent with the findings of a previous study48. The association between BMI and depression is complex and may be influenced by cultural background differences and psychosocial factors of the study subjects. When societal bias and discrimination against body weight are less significant, it may reduce the link between BMI and depression49, which could explain the findings of this study.

In this study, a positive correlation was observed between the loneliness score and the sleep quality score. Specifically, the higher the level of loneliness, the poorer the sleep quality, which is in line with the findings of previous meta-analyses exploring the association between loneliness and sleep50. Previous research has indicated that stress is one of the key predictors of sleep quality and is closely associated with loneliness51,52. Studies have indicated that the stress experienced due to loneliness partially mediates the association between loneliness and sleep quality53. Excessively high stress can over-activate the hypothalamic–pituitary–adrenal axis, trigger pre-sleep cognitive arousal, and disrupt sleep54. Moreover, at the neurobiological level, loneliness is related to structural and functional alterations in key brain regions, such as the amygdala, prefrontal cortex, insula, and the networks involved in attention and vision. These regions play significant roles in emotional regulation, self-perception, and social cognition, and their dysfunction may be associated with a decline in sleep quality55.

A study in South Korea involving 176,794 adults indicated that poor sleep quality was significantly associated with depressive symptoms56, and our study reached the same conclusion. Inflammatory pathways might explain the association between sleep disorders and depression. Specifically, it has been demonstrated that sleep deprivation or disorders can lead to an upregulation of pro-inflammatory cytokines, including interleukin-6 (IL-6), tumor necrosis factor-alpha (TNF-α), and C-reactive protein57,58, which in turn are significantly correlated with the presence of depression59. Furthermore, there appears to be a genetic comorbidity between sleep disturbances and depression60, suggesting that certain genes implicated in sleep regulation may also play a role in depression. Additionally, sleep disturbances may contribute to the progression of depression by disrupting the normal expression of circadian rhythm genes61.

This study shows that loneliness can significantly and positively predict depressive symptoms, which is consistent with the results of previous studies14. Chronic stress is a recognized risk factor for depression62. As a social stressor, loneliness52 can trigger long-term chronic stress. From a physiological perspective, stress can activate the hypothalamic–pituitary–adrenal (HPA) axis, leading to the over-secretion of stress hormones such as cortisol63,64. Prolonged exposure to high cortisol levels can disrupt the normal metabolism and regulation of neurotransmitters, thereby increasing an individual’s risk of developing depression65. Some studies have indicated that exposure to chronic stress can lead to a decline in sleep quality, which in turn indirectly triggers depression66. Sleep plays a crucial role in physical recovery and stress response. Good sleep can reduce the levels of stress hormones, thus alleviating the negative physical and psychological impacts of stress67. Therefore, improving sleep quality can not only relieve chronic stress but also mitigate the impact of loneliness on depressive symptoms.

Previous studies on the interactions among loneliness, sleep quality, and depressive symptoms have yielded varying results. For example, research on patients with type 2 diabetes has shown that the direct impact of loneliness on sleep quality is not significant, and the relationship between the two is mainly mediated by depressive symptoms26. However, studies conducted during the COVID-19 pandemic have indicated that sleep quality mediates the association between loneliness and overall mental health (including depression, anxiety, and stress), with the mediating effect accounting for 37.58%27. The findings of this study are consistent with this, confirming that there is a significant mediating effect of sleep quality between loneliness and depressive symptoms. This discovery provides a new perspective for understanding the mechanism by which loneliness triggers depression: intense feelings of loneliness may indicate poor sleep quality, which in turn can trigger or exacerbate depressive symptoms. Therefore, the results of this study suggest that improving sleep quality may alleviate the negative impact of loneliness on depression. Based on this, in preventive healthcare work, intervention programs for improving sleep quality, such as sleep health education, cognitive-behavioral therapy, and relaxation training, should be provided to individuals experiencing loneliness, so as to prevent or reduce the occurrence of depressive symptoms. In clinical practice, doctors and mental health professionals can adopt a comprehensive treatment approach that combines psychotherapy, pharmacotherapy, and sleep intervention for patients with depression to improve the treatment effect.

This study has limitations. First, it uses cross-sectional data for causal effect inference, limiting our ability to precisely determine causal relationships. Future studies should use a longitudinal design to directly verify the causal links among loneliness, sleep quality, and depressive symptoms, providing a solid theoretical base for early intervention. Second, despite controlling for many potential confounding factors, unmeasured ones may still affect the results. Future research could explore these variable relationships in diverse populations and cultural settings to enhance the generalizability of findings. Third, data collection through questionnaires is prone to recall bias. Additionally, the relationships among sleep quality, loneliness, and depression are complex. This study only verified the mediating effect of sleep quality. Sleep quality may also have a moderating effect, and factors like personality traits and social support may moderate this mediating relationship. Future research can comprehensively consider sleep quality’s different roles and incorporate more relevant variables for an in-depth analysis of this complex relationship.

Conclusion

In conclusion, the detection rate of depressive symptoms among participants in this study was 20.9%, with loneliness and poor sleep quality confirmed as independent risk factors for depression. In addition, the relationship between loneliness and depressive symptoms was found to be partially mediated by sleep quality. The results of this study highlight the importance of assessing and improving sleep quality in people experiencing loneliness. Interventions aimed at alleviating loneliness may benefit from incorporating strategies to improve sleep, which could help in reducing the development of depressive symptoms. Implementing interventions that both reduce loneliness and enhance sleep quality simultaneously may be more effective in preventing or alleviating depressive symptoms in this population.

Supplementary Information

Author contributions

Y.L. and D.-l.Z. conceived and designed the study. W.-h.W., L.Z., and M.X. collected and evaluated the data. Y.L., L.-p.S., D.-l.Z., M.-y.W., and D. L. analyzed and interpreted the data, and Y.L. wrote the manuscript. Y.L., M.-j.W., and J.-f.H. revised the manuscript. All authors read and approved the final manuscript. All authors agree to publish this work.

Funding

This work was supported by the Natural Science Basic Research Program of Shaanxi (Program No. 2023-JC-YB-827).

Data availability

The datasets used and/or analyzed during the current study are available from the corresponding author upon reasonable request.

Competing interests

The authors declare no competing interests.

Ethics declarations

The study complied with the guidelines of the 2013 revised Declaration of Helsinki and was approved by the Medical Ethics Review Committee of Xi’an Medical College (Approval No. XYLS2023090); all participants in this investigation obtained their informed consent before being investigated.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Yue Liu and Donglin Zhang contributed equally to this work.

Contributor Information

Minjuan Wang, Email: 2602942082@qq.com.

Lei Zhang, Email: 21443141@qq.com.

Supplementary Information

The online version contains supplementary material available at 10.1038/s41598-025-93681-3.

References

  • 1.Collaborators., G. D. a. I. Global incidence, prevalence, years lived with disability (YLDs), disability-adjusted life-years (DALYs), and healthy life expectancy (HALE) for 371 diseases and injuries in 204 countries and territories and 811 subnational locations, 1990-2021: a systematic analysis for the Global Burden of Disease Study 2021. Lancet403, 2133–2161. 10.1016/s0140-6736(24)00757-8 (2024). [DOI] [PMC free article] [PubMed]
  • 2.Malhi, G. S. & Mann, J. J. Depression. Lancet392, 2299–2312. 10.1016/s0140-6736(18)31948-2 (2018). [DOI] [PubMed] [Google Scholar]
  • 3.da Silva, J., Gonçalves-Pereira, M., Xavier, M. & Mukaetova-Ladinska, E. B. Affective disorders and risk of developing dementia: systematic review. Br. J. Psychiatry202, 177–186. 10.1192/bjp.bp.111.101931 (2013). [DOI] [PubMed] [Google Scholar]
  • 4.Rodda, J., Walker, Z. & Carter, J. Depression in older adults. BMJ (Clin. Res. Ed.)343, d5219. 10.1136/bmj.d5219 (2011). [DOI] [PubMed] [Google Scholar]
  • 5.Cai, H. et al. Global prevalence of depression in older adults: a systematic review and meta-analysis of epidemiological surveys. Asian J. Psychiatr.80, 103417. 10.1016/j.ajp.2022.103417 (2023). [DOI] [PubMed] [Google Scholar]
  • 6.Tang, T., Jiang, J. & Tang, X. Prevalence of depressive symptoms among older adults in mainland China: a systematic review and meta-analysis. J. Affect. Disord.293, 379–390. 10.1016/j.jad.2021.06.050 (2021). [DOI] [PubMed] [Google Scholar]
  • 7.Bergman, Y. S. & Segel-Karpas, D. Aging anxiety, loneliness, and depressive symptoms among middle-aged adults: the moderating role of ageism. J. Affect. Disord.290, 89–92. 10.1016/j.jad.2021.04.077 (2021). [DOI] [PubMed] [Google Scholar]
  • 8.McKenna-Plumley, P. E., Turner, R. N., Yang, K. & Groarke, J. M. Experiences of loneliness across the lifespan: a systematic review and thematic synthesis of qualitative studies. Int. J. Qual. Stud. Health Well Being18, 2223868. 10.1080/17482631.2023.2223868 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Jylhä, M. Old age and loneliness: cross-sectional and longitudinal analyses in the Tampere Longitudinal Study on Aging. Can. J. Aging23, 157–168. 10.1353/cja.2004.0023 (2004). [DOI] [PubMed] [Google Scholar]
  • 10.Aartsen, M. & Jylhä, M. Onset of loneliness in older adults: results of a 28 year prospective study. Eur. J. Ageing8, 31–38. 10.1007/s10433-011-0175-7 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Valtorta, N. & Hanratty, B. Loneliness, isolation and the health of older adults: do we need a new research agenda?. J. R. Soc. Med.105, 518–522. 10.1258/jrsm.2012.120128 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Quadt, L., Esposito, G., Critchley, H. D. & Garfinkel, S. N. Brain-body interactions underlying the association of loneliness with mental and physical health. Neurosci. Biobehav. Rev.116, 283–300. 10.1016/j.neubiorev.2020.06.015 (2020). [DOI] [PubMed] [Google Scholar]
  • 13.Manoli, A., McCarthy, J. & Ramsey, R. Estimating the prevalence of social and emotional loneliness across the adult lifespan. Sci. Rep.12, 21045. 10.1038/s41598-022-24084-x (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Van As, B. A. L., Imbimbo, E., Franceschi, A., Menesini, E. & Nocentini, A. The longitudinal association between loneliness and depressive symptoms in the elderly: a systematic review. Int. Psychogeriatr.34, 657–669. 10.1017/s1041610221000399 (2022). [DOI] [PubMed] [Google Scholar]
  • 15.Furutani, M., Guo, T., Hall, K. & Zhou, X. Relationship between mental health and the quality of sleep during the first self-restraint in Japanese workers: a cross-sectional survey. Health Psychol. Behav. Med.10, 748–761. 10.1080/21642850.2022.2112583 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Hawkley, L. C. & Cacioppo, J. T. Loneliness matters: a theoretical and empirical review of consequences and mechanisms. Ann. Behav. Med.40, 218–227. 10.1007/s12160-010-9210-8 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Wong, N. M. et al. Loneliness in late-life depression: structural and functional connectivity during affective processing. Psychol. Med.46, 2485–2499. 10.1017/s0033291716001033 (2016). [DOI] [PubMed] [Google Scholar]
  • 18.Ypsilanti, A., Lazuras, L., Powell, P. & Overton, P. Self-disgust as a potential mechanism explaining the association between loneliness and depression. J. Affect. Disord.243, 108–115. 10.1016/j.jad.2018.09.056 (2019). [DOI] [PubMed] [Google Scholar]
  • 19.Charest, J. & Grandner, M. A. Sleep and athletic performance: impacts on physical performance, mental performance, injury risk and recovery, and mental health. Sleep Med. Clin.15, 41–57. 10.1016/j.jsmc.2019.11.005 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Ekström, H., Svensson, M., Elmståhl, S. & Wranker, L. S. The association between loneliness, social isolation, and sleep disturbances in older adults: a follow-up study from the Swedish good aging in Skåne project. SAGE Open Med.12, 20503121231222824. 10.1177/20503121231222823 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Livingston, G., Blizard, B. & Mann, A. Does sleep disturbance predict depression in elderly people? A study in inner London. Br. J. Gener. Pract.43, 445–448 (1993). [PMC free article] [PubMed] [Google Scholar]
  • 22.Fang, H., Tu, S., Sheng, J. & Shao, A. Depression in sleep disturbance: a review on a bidirectional relationship, mechanisms and treatment. J. Cell. Mol. Med.23, 2324–2332. 10.1111/jcmm.14170 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Mirchandaney, R., Asarnow, L. D. & Kaplan, K. A. Recent advances in sleep and depression. Curr. Opin. Psychiatry36, 34–40. 10.1097/yco.0000000000000837 (2023). [DOI] [PubMed] [Google Scholar]
  • 24.Liu, Y. et al. The mediating role of sleep quality on the relationship between perceived stress and depression among the elderly in urban communities: a cross-sectional study. Public Health149, 21–27. 10.1016/j.puhe.2017.04.006 (2017). [DOI] [PubMed] [Google Scholar]
  • 25.Wang, Q., Zan, C., Jiang, F., Shimpuku, Y. & Chen, S. Association between loneliness and its components and cognitive function among older Chinese adults living in nursing homes: a mediation of depressive symptoms, anxiety symptoms, and sleep disturbances. BMC Geriatr.22, 959. 10.1186/s12877-022-03661-9 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Lu, Y. et al. Loneliness, depression and sleep quality among the type 2 diabetic patients during COVID-19 local epidemic: a mediation analysis. Nurs Open10, 6345–6356. 10.1002/nop2.1883 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Gu, S. et al. Effects of Coronavirus-19 induced loneliness on mental health: sleep quality and intolerance for uncertainty as mediators. Front. Psychiatry12, 738003. 10.3389/fpsyt.2021.738003 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Andresen, E. M., Malmgren, J. A., Carter, W. B. & Patrick, D. L. Screening for depression in well older adults: evaluation of a short form of the CES-D (Center for Epidemiologic Studies Depression Scale). Am. J. Prevent. Med.10, 77–84 (1994). [PubMed] [Google Scholar]
  • 29.Peng, S., Wang, S. & Feng, X. L. Multimorbidity, depressive symptoms and disability in activities of daily living amongst middle-aged and older Chinese: evidence from the China Health and Retirement Longitudinal Study. J. Affect. Disord.295, 703–710. 10.1016/j.jad.2021.08.072 (2021). [DOI] [PubMed] [Google Scholar]
  • 30.Hays, R. D. & DiMatteo, M. R. A short-form measure of loneliness. J. Personal. Assess.51, 69–81. 10.1207/s15327752jpa5101_6 (1987). [DOI] [PubMed] [Google Scholar]
  • 31.Wegner, L. & Liu, S. Positive and negative experiences with the COVID-19 pandemic among lonely and non-lonely populations in Germany. Front. Public Health10, 1067038. 10.3389/fpubh.2022.1067038 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Buysse, D. J., Reynolds, C. F. 3rd., Monk, T. H., Berman, S. R. & Kupfer, D. J. The Pittsburgh Sleep Quality Index: a new instrument for psychiatric practice and research. Psychiatry Res.28, 193–213. 10.1016/0165-1781(89)90047-4 (1989). [DOI] [PubMed] [Google Scholar]
  • 33.Zhang, C. et al. Reliability, validity, and factor structure of pittsburgh sleep quality index in community-based centenarians. Front. Psychiatry11, 573530. 10.3389/fpsyt.2020.573530 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Hayes, A. F. & Rockwood, N. J. Regression-based statistical mediation and moderation analysis in clinical research: observations, recommendations, and implementation. Behav. Res. Therapy98, 39–57. 10.1016/j.brat.2016.11.001 (2017). [DOI] [PubMed] [Google Scholar]
  • 35.Wu, N. W. et al. Analysis of the status of depression and the influencing factors in middle-aged and older adults in China. J. Sichuan Univ. Med. Sci. Ed.52, 767–771. 10.12182/20210960507 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Wang, D. et al. Depression status and its influencing factors among the elderly aged 60 years and above in three provinces of China. Zhonghua liu xing bing xue za zhi43, 1925–1931. 10.3760/cma.j.cn112338-20220418-00313 (2022). [DOI] [PubMed] [Google Scholar]
  • 37.Henking, C., Reeves, A. & Chrisinger, B. Global inequalities in mental health problems: understanding the predictors of lifetime prevalence, treatment utilisation and perceived helpfulness across 111 countries. Prevent. Med.177, 107769. 10.1016/j.ypmed.2023.107769 (2023). [DOI] [PubMed] [Google Scholar]
  • 38.Zhao, Y. et al. Late-life depression: epidemiology, phenotype, pathogenesis and treatment before and during the COVID-19 pandemic. Front. Psychiatry14, 1017203. 10.3389/fpsyt.2023.1017203 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Kundakovic, M. & Rocks, D. Sex hormone fluctuation and increased female risk for depression and a nxiety disorders: from clinical evidence to molecular mechanisms. Front. Neuroendocrinol.66, 101010. 10.1016/j.yfrne.2022.101010 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Nakagomi, A., Shiba, K., Hanazato, M., Kondo, K. & Kawachi, I. Does community-level social capital mitigate the impact of widowhood & living alone on depressive symptoms?: a prospective, multi-level study. Soc. Sci. Med.259, 113140. 10.1016/j.socscimed.2020.113140 (2020). [DOI] [PubMed] [Google Scholar]
  • 41.Widhowati, S. S., Chen, C. M., Chang, L. H., Lee, C. K. & Fetzer, S. Living alone, loneliness, and depressive symptoms among Indonesian older women. Health Care Women Int.41, 984–996. 10.1080/07399332.2020.1797039 (2020). [DOI] [PubMed] [Google Scholar]
  • 42.Srivastava, S., Debnath, P., Shri, N. & Muhammad, T. The association of widowhood and living alone with depression among older adults in India. Sci. Rep.11, 21641. 10.1038/s41598-021-01238-x (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Freak-Poli, R., Kung, C. S. J., Ryan, J. & Shields, M. A. Social isolation, social support, and loneliness profiles before and after spousal death and the buffering role of financial resources. J. Gerontol. Ser. B Psychol. Sci. Soc. Sci.77, 956–971. 10.1093/geronb/gbac039 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Lorant, V. et al. Depression and socio-economic risk factors: 7-year longitudinal popula tion study. Br. J. Psychiatry190, 293–298. 10.1192/bjp.bp.105.020040 (2007). [DOI] [PubMed] [Google Scholar]
  • 45.Jiang, C. H., Zhu, F. & Qin, T. T. Relationships between chronic diseases and depression among middle-aged and elderly people in China: a prospective study from CHARLS. Curr. Med. Sci.40, 858–870. 10.1007/s11596-020-2270-5 (2020). [DOI] [PubMed] [Google Scholar]
  • 46.Jung, S. J. et al. Association between body size, weight change and depression: systematic review and meta-analysis. Br. J. Psychiatry211, 14–21. 10.1192/bjp.bp.116.186726 (2017). [DOI] [PubMed] [Google Scholar]
  • 47.Herhaus, B., Kersting, A., Brähler, E. & Petrowski, K. Depression, anxiety and health status across different BMI classes: a representative study in Germany. J. Affect. Disord.276, 45–52. 10.1016/j.jad.2020.07.020 (2020). [DOI] [PubMed] [Google Scholar]
  • 48.Roberts, R. E. & Duong, H. T. Obese youths are not more likely to become depressed, but depressed youths are more likely to become obese. Psychol. Med.43, 2143–2151. 10.1017/s0033291712002991 (2013). [DOI] [PubMed] [Google Scholar]
  • 49.He, K., Pang, T. & Huang, H. The relationship between depressive symptoms and BMI: 2005–2018 NHANES data. J. Affect. Disord.313, 151–157. 10.1016/j.jad.2022.06.046 (2022). [DOI] [PubMed] [Google Scholar]
  • 50.Griffin, S. C., Williams, A. B., Ravyts, S. G., Mladen, S. N. & Rybarczyk, B. D. Loneliness and sleep: a systematic review and meta-analysis. Health Psychol. Open7, 2055102920913235. 10.1177/2055102920913235 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 51.Åkerstedt, T. et al. Predicting sleep quality from stress and prior sleep–a study of day-to-day covariation across six weeks. Sleep Med.13, 674–679. 10.1016/j.sleep.2011.12.013 (2012). [DOI] [PubMed] [Google Scholar]
  • 52.Campagne, D. M. Stress and perceived social isolation (loneliness). Arch. Gerontol. Geriatr.82, 192–199. 10.1016/j.archger.2019.02.007 (2019). [DOI] [PubMed] [Google Scholar]
  • 53.McHugh, J. E. & Lawlor, B. A. Perceived stress mediates the relationship between emotional loneliness and sleep quality over time in older adults. Br. J. Health Psychol.18, 546–555. 10.1111/j.2044-8287.2012.02101.x (2013). [DOI] [PubMed] [Google Scholar]
  • 54.Yap, Y., Slavish, D. C., Taylor, D. J., Bei, B. & Wiley, J. F. Bi-directional relations between stress and self-reported and actigraphy-assessed sleep: a daily intensive longitudinal study. Sleep43, 3. 10.1093/sleep/zsz250 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Lam, J. A. et al. Neurobiology of loneliness: a systematic review. Neuropsychopharmacology46, 1873–1887. 10.1038/s41386-021-01058-7 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Joo, H. J., Kwon, K. A., Shin, J., Park, S. & Jang, S. I. Association between sleep quality and depressive symptoms. J. Affect. Disord.310, 258–265. 10.1016/j.jad.2022.05.004 (2022). [DOI] [PubMed] [Google Scholar]
  • 57.Irwin, M. R., Carrillo, C. & Olmstead, R. Sleep loss activates cellular markers of inflammation: sex differences. Brain Behav. Immunity24, 54–57. 10.1016/j.bbi.2009.06.001 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 58.Irwin, M. R., Olmstead, R. & Carroll, J. E. Sleep disturbance, sleep duration, and inflammation: a systematic review and meta-analysis of cohort studies and experimental sleep deprivation. Biol. Psychiatry80, 40–52. 10.1016/j.biopsych.2015.05.014 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Mac-Giollabhui, N., Ng, T. H., Ellman, L. M. & Alloy, L. B. The longitudinal associations of inflammatory biomarkers and depression revisited: systematic review, meta-analysis, and meta-regression. Mol. Psychiatry26, 3302–3314. 10.1038/s41380-020-00867-4 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 60.Madrid-Valero, J. J. & Gregory, A. M. Behaviour genetics and sleep: a narrative review of the last decade of quantitative and molecular genetic research in humans. Sleep Med. Rev.69, 101769. 10.1016/j.smrv.2023.101769 (2023). [DOI] [PubMed] [Google Scholar]
  • 61.Charrier, A., Olliac, B., Roubertoux, P. & Tordjman, S. Clock genes and altered sleep-wake rhythms: their role in the development of psychiatric disorders. Int. J. Mol. Sci.18, 938. 10.3390/ijms18050938 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 62.Hammen, C. Stress and depression. Annu. Rev. Clin. Psychol.1, 293–319. 10.1146/annurev.clinpsy.1.102803.143938 (2005). [DOI] [PubMed] [Google Scholar]
  • 63.Xia, N. & Li, H. Loneliness, social isolation, and cardiovascular health. Antioxid. Redox Signal.28, 837–851. 10.1089/ars.2017.7312 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 64.Cacioppo, J. T. et al. Loneliness across phylogeny and a call for comparative studies and animal models. Perspect. Psychol. Sci.10, 202–212. 10.1177/1745691614564876 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 65.Yang, L. et al. The effects of psychological stress on depression. Curr. Neuropharmacol.13, 494–504. 10.2174/1570159x1304150831150507 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 66.da Estrela, C., McGrath, J., Booij, L. & Gouin, J. P. Heart rate variability, sleep quality, and depression in the context of chronic stress. Ann. Behav. Med.55, 155–164. 10.1093/abm/kaaa039 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 67.Lo-Martire, V., Berteotti, C., Zoccoli, G. & Bastianini, S. Improving sleep to improve stress resilience. Curr. Sleep Med. Rep.10, 23–33. 10.1007/s40675-024-00274-z (2024). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

The datasets used and/or analyzed during the current study are available from the corresponding author upon reasonable request.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES