Introduction

Suicide is one of the leading causes of death worldwide and has become a significant public health concern1. Suicidal ideation is not only an early symptom of suicidal actions but also a primary risk factor for subsequent suicidal behaviors2. Suicidal ideation is defined as the presence of thoughts about self-harm or the formulation of specific plans and considerations regarding ending one’s life, without any actual steps taken toward implementation3. Chinese college students are a high-risk group for suicidal ideation4. On one hand, they face intense academic pressures and employment pressure5,6. On the other hand, the stigma around mental health leads to the concealment of psychological distress7. Additionally, within the collectivist cultural context, individual emotions are often suppressed, further exacerbating psychological crises8. Therefore, targeted interventions for suicidal ideation in this population are both urgent and socially significant.

Poor sleep quality is associated with increased odds of suicidal ideation9. Sleep quality is commonly defined as an individual’s overall satisfaction with their sleep experience, and its four attributes are sleep efficiency, sleep latency, sleep duration, and wake after sleep onset10. Several studies and reports indicate that sleep quality has been declining in recent years among college students11. Evidence indicates sleep quality is generally associated with health outcomes, with additional moderate effects on cognitive performance and physical health12. Sleep quality is closely associated with suicidal ideation in young adults13,14. Studies have reported that poor sleep quality increases the risk of suicide by 34%15. One 10-year longitudinal study revealed that poor subjective sleep quality positively predicts suicidal ideation even after adjusting for depressive symptoms, and is associated with an increased risk of death by suicide a decade later16. College students with low sleep satisfaction exhibit higher levels of suicidal ideation17. Studies have further demonstrated that, after controlling for depression, poor sleep quality, and insomnia among college students significantly predict suicidal ideation18,19. Shorter sleep duration and poorer sleep quality also positively predict the risk of suicidal ideation the following day20. Additionally, changes in sleep patterns, insomnia, and nightmares among college students are positively associated with suicidal ideation16. Given the robust evidence linking poor sleep quality to heightened suicidal ideation, exploring the mechanisms through which sleep quality influences suicidal ideation among college students is critical for developing effective prevention strategies and reducing suicidal ideation within this population. Based on this context, Hypothesis 1 is proposed that poor sleep quality is positively associated with suicidal ideation among college students.

Depressive symptoms are a common mental disorder among college students. Depressive symptoms are associated with adverse health outcomes, including functional impairment21, increased cardiovascular risk22, and elevated suicide mortality23. Studies demonstrate significant prevalence rates of depressive symptoms across age groups, including both middle-aged/elderly populations and college students24. Risk factors, including delayed sleep phase (later than 01:30), sleep initiation difficulty (latency ≥ 30 min), and overall poor sleep quality, exhibited significance in correlating with depressive symptom severity among college students25. Additionally, short sleep duration and poor sleep quality are also associated with a higher prevalence of depressive symptoms among college students11. Depressive symptoms are an important predictor of suicidal ideation25. The severity of depressive symptoms is positively correlated with the intensity of suicidal ideation26. College students with greater depression severity were more likely to endorse suicidal ideation27,28. Improving sleep quality may prevent the development of depressive symptoms and reduce the likelihood of suicidal ideation25. These findings suggest that depressive symptoms may act as a mediator in the relationship between sleep quality and suicidal ideation. However, whether depressive symptoms act as a complete mediator or a partial mediator in the relationship between sleep quality and suicidal ideation still requires further research exploration. Therefore, Hypothesis 2 proposes that depressive symptoms mediate the relationship between sleep quality and suicidal ideation among college students.

The effect of poor sleep quality on depressive symptoms may be moderated by certain behavioral patterns, such as physical exercise. According to the Stress and Coping Theory29, poor sleep quality constitutes a stressful event for individuals, and physical exercise, as an active coping mechanism, can mitigate stress-related negative outcomes. On the one hand, according to the Cognitive Appraisal Theory of Stress and Coping Theory, physical exercise enhances an individual’s self-efficacy30, reduces threat appraisal of stressors31, and decreases anxiety and ruminative thinking32, thereby improving sleep quality33 and alleviating depressive symptoms34. On the other hand, according to the Physiological Stress Theory of Stress and Coping Theory35, physical exercise reduces cortisol levels36, normalizes HPA axis hyperactivity37, decreases nocturnal awakenings, and improves sleep quality33, thereby alleviating depressive symptoms34. Studies have shown a significant negative correlation between physical exercise and depression, with physical exercise serving as a moderating factor for depression38. Physical exercise may be effective in improving depressive state, hormonal response to stress, and physiological fitness39. However, the moderating effect of physical exercise on the relationship between sleep quality and depressive symptoms in college students has not yet been reported in the literature, and exercise interventions are more readily accepted by young adult populations. Moreover, compared to sleep hygiene or social support interventions, physical exercise demonstrates unique advantages in modulating neuroplasticity, enhancing self-efficacy, and regulating circadian rhythms40. Therefore, Hypothesis 3 is proposed that physical exercise moderates the relationship between sleep quality and depressive symptoms among college students.

In summary, this study establishes a moderated mediation model, with sleep quality as the independent variable, suicidal ideation as the dependent variable, depressive symptoms as the mediating variable, and physical exercise as the moderating variable. Building upon the acknowledged theoretical framework of sleep–depression–suicidality triad41, this study introduces an innovative extension by incorporating physical exercise as a modifiable protective factor, thereby constructing a dynamic “risk-protection” equilibrium model. Utilizing a moderated mediation approach, the research examines the buffering effect of physical exercise on the relationship between sleep quality and depressive symptoms. This theoretical-methodological integration not only preserves the mediating role of depressive symptoms in explaining the pathological mechanisms of suicidal ideation but also provides a novel precision prevention strategy based on exercise intervention, marking a paradigm shift from risk prediction to actionable prevention. The proposed model is illustrated in Fig. 1.

Fig. 1
Fig. 1
Full size image

Moderated mediation model.

Methods

Participants

This study utilized a stratified cluster random sampling method to survey college students from six universities randomly selected from Guangdong Province, including Guangzhou, Zhaoqing, and Zhuhai. Within each sampled university, we first stratified participants by academic discipline (Engineering & Technology, Natural Sciences, Humanities & Literature, Social Sciences Management, and Arts), then conducted cluster sampling by academic year (Year 1 through Year 4) within each disciplinary stratum. During implementation, we ensured each university covered at least three core academic disciplines while maintaining balanced sample distribution across all four undergraduate years. A total of 1296 questionnaires were collected, of which 1265 were valid, yielding an effective response rate of 97.61%. Participants included 659 male and 606 female students, with 356 freshmen, 323 sophomores, 317 juniors, and 269 seniors. Power analysis using the R program indicated that the sample size of 1265 in this study had a statistical power of 1, thus, this study has sufficient confidence in the correctness of the results42.

By the Declaration of Helsinki, the study design was approved by the Ethics Committee for Human Research at Zhaoqing University. Participation was voluntary, and informed consent was obtained from all subjects. All participants were informed of the study’s purpose, response methods, and precautions before providing written informed consent. The survey utilized Wenjuanxing, a widely used online survey platform in China, including electronic questionnaire design, multi-channel distribution, and real-time data collection. The study employed a validated measurement scale and distributed the questionnaire via Wenjuanxing, allowing students to complete it independently on either computers or mobile devices. Emphasis was placed on voluntary participation, confidentiality, and anonymity. Before data collection, all personnel involved in questionnaire administration received standardized training on the testing procedures, key points, and methods. Invalid questionnaires (e.g., those with short response times, missing data, patterned responses, or inconsistent answers) were excluded from the analysis.

Measures

Sleep quality

Sleep quality was assessed using the Pittsburgh Sleep Quality Index (PSQI) developed by Buysse et al.43 and revised by Liu et al.44. The scale consists of seven dimensions: subjective sleep quality (e.g., "Over the past month, how would you rate your overall sleep quality?”), sleep latency(e.g., "Over the past month, how many minutes has it typically taken you to fall asleep after getting into bed?”), sleep duration (e.g., "During the past month, how many hours of actual sleep did you typically get each night (excluding time spent in bed while awake)?”), sleep efficiency (e.g., "Over the past month, what time have you typically woken up in the morning?”), sleep disturbances (e.g., "Frequent nighttime awakenings or early morning awakening.”), use of sleeping medication (e.g., "Over the past month, how often have you used sleep medication?”), and daytime dysfunction (e.g., "Over the past month, have you frequently felt drowsy?”). Each dimension is scored on a scale of 0 to 3 points, with the cumulative score representing the total score. The total score ranges from 0 to 21, where higher scores indicate poorer sleep quality. In this study, the PSQI demonstrated good internal consistency, with a Cronbach’s α coefficient of 0.76.

Suicidal ideation

This study utilized the subscale of the Beck Scale for Suicide Ideation-Chinese Version (BSS-C), developed by Beck et al.45 and revised by Li et al.46, to assess suicidal ideation among college students over the past week. The scale consists of a unidimensional structure with five items (e.g., "How strong is your desire to live?"). Each item is scored on a 3-point scale, where 0 indicates the absence of related thoughts or behaviors, 1 indicates mild to moderate levels of related thoughts or behaviors, and 2 indicates strong levels of related thoughts or behaviors. The total score of the scale ranges from 0 to 10, with higher scores indicating more severe suicidal ideation. This measurement tool has been widely verified and applied in a population of Chinese college students47. The Cronbach’s α coefficient for this scale was 0.89, demonstrating excellent internal consistency and reliability of the measurement instrument.

Depressive symptoms

Depressive symptoms were assessed using the Short-form Depression Scale, originally developed by Andresen et al.48 and later revised by Xiong49. The scale comprises three dimensions: somatic symptoms (e.g., “I'm having trouble focusing on my tasks.”), depressive mood (e.g., “I'm feeling down.”), and positive mood (e.g., “Lately, I've been getting bothered by things that never used to trouble me.”), with a total of 10 items. Each item is rated on a 4-point Likert scale, ranging from 1 ("none or almost none") to 5 (“almost always”). The total score of the scale ranges from 10 to 40, with higher scores indicating a greater severity of depression. In this study, the scale demonstrated good internal consistency, with a Cronbach’s α coefficient of 0.91.

Physical exercise

Physical exercise was assessed using the Physical Activity Rating Scale (PARS-3) developed by Hashimoto50 and compiled by Liang51. It is used to assess an individual’s level of physical exercise. The scale consisted of three items: intensity, time, and frequency. Each item is rated on a five-point scale, with intensity and frequency scored from 1 to 5, and time scored from 0 to 4. The total score is calculated as follows: intensity × time × frequency. The higher score represents a higher level of physical exercise. In this study, Cronbach’s α coefficient of the scale was 0.71.

Statistical analysis

All statistical analyses were performed using SPSS 26.0 software. First, Harman’s single-factor test was employed to examine common method bias in the self-reported data. Second, reliability and goodness-of-fit analyses were conducted to assess the measurement instruments. Third, descriptive statistics and correlation analyses were performed on the variables. Fourth, the mediating effect of depressive symptoms between sleep quality and suicidal ideation was examined using PROCESS v4.1 macro Model 4 with Bootstrap analysis. Fifth, PROCESS v4.1 macro Model 7 was utilized to analyze the moderating effect of physical exercise in the relationship between sleep quality and depression, followed by Bootstrap analysis to test the mediating effect of depressive symptoms between sleep quality and suicidal ideation at different levels of physical exercise. Besides, simple slope tests following Aiken and West’s method were conducted to further investigate the moderating role of physical exercise in the relationship between sleep quality and depression.

Results

Common method bias test

To assess common method bias, Harman’s single-factor test was employed. All measurement items of the variables were subjected to exploratory factor analysis. Before factor rotation, seven principal components were extracted, with the first factor accounting for 30.363% of the variance, which is below the critical threshold of 40%52. Therefore, it can be concluded that the data in this study do not exhibit significant common method bias.

Correlation analysis

The results in Table 1 indicate that sleep quality is positively correlated with depressive symptoms (r = 0.370, p < 0.01) and suicidal ideation (r = 0.281, p < 0.01). Additionally, depressive symptoms show a positive correlation with suicidal ideation (r = 0.459, p < 0.01). In contrast, physical exercise demonstrates negative correlations with sleep quality (r =  − 0.260, p < 0.01), depressive symptoms (r =  − 0.149, p < 0.01), and suicidal ideation (r =  − 0.033, p < 0.01).

Table 1 Correlation and descriptive statistics.

Mediation test

A simple mediation analysis was conducted using Model 4 of the PROCESS v4.1 macro developed by Hayes53 to examine the mediating role of depressive symptoms between sleep quality and suicidal ideation. The results are presented in Table 2 and Fig. 2. Sleep quality has a positive effect on suicidal ideation (β = 0.281, t = 9.931, p < 0.001). Even after introducing depressive symptoms, the effect of sleep quality on suicidal ideation is also significant (β = 0.130, t = 4.630, p < 0.001). Additionally, sleep quality has a positive effect on depressive symptoms (β = 0.370, t = 13.493, p < 0.001), and depressive symptoms have a positive effect on suicidal ideation (β = 0.410, t = 14.634, p < 0.001). In the model incorporating two independent variables (sleep quality and depressive symptoms), the R2 value of 0.224 indicates that these variables collectively explain 22.4% of the variance in the dependent variable. Although the absolute explanatory power is modest, the model demonstrates clinically meaningful predictive utility. Collinearity diagnostics revealed that the variance inflation factor (VIF) values for sleep quality and depressive symptoms were 1.129 and 1.163, respectively, both below 3, indicating no collinearity issues between the two variables.

Table 2 Regression analysis of the mediating role of depressive symptoms.
Fig. 2
Fig. 2
Full size image

Mediation model test (***p < 0.001).

In addition, Bootstrap analysis was conducted to test the mediation paths. Results are shown in Table 2. The mediation analysis revealed that the direct effect of sleep quality on suicidal ideation is significant (95% CI did not include 0), while the actual β value is 0.130, suggesting a small effect. Depressive symptoms significantly mediated the relationship between sleep quality and suicidal ideation, with a standardized indirect effect of 0.151 (95% CI [0.123, 0.182]), accounting for 53.74% of the total effect. These results indicate that depressive symptoms partially mediate the relationship between sleep quality and suicidal ideation (indirect effect), while sleep quality additionally exerts a direct effect on suicidal ideation that is independent of depressive symptoms (direct effect). Thus, Hypotheses 1 and 2 are verified (Table 3).

Table 3 Mediation effect testing based on the Bootstrap method.

Moderated mediation test

The moderating role of physical exercise in the relationship between sleep quality and depressive symptoms was analyzed using Model 7 of the PROCESS v4.1 macro developed by Hayes53. As shown in Table 4, after introducing physical exercise as a moderator, sleep quality maintained a positive effect on depressive symptoms (β = 0.353, t = 12.480, p < 0.001). Physical exercise has a negative effect on depressive symptoms (β =  − 0.072, t =  − 2.490, p < 0.05). Additionally, the interaction term between sleep quality and physical exercise also demonstrates a negative effect on depressive symptoms (β =  − 0.070, t =  − 2.585, p < 0.01). Figure 3 presents the moderated mediation model with all significant pathways marked.

Table 4 Moderated mediation effect.
Fig. 3
Fig. 3
Full size image

Moderated mediation model test (*p < 0.05; **p < 0.01; ***p < 0.001).

To further explore the moderating role of physical exercise, a simple slope test was conducted using the method proposed by Aiken and West54. Figure 4 displays the simple slope analysis results, illustrating the conditional effects at high (+ 1 SD) and low (-1 SD) levels of physical exercise. Compared to students with lower levels of physical exercise (simple slope = 0.423, t = 10.967, p < 0.001), the positive effect of sleep quality on depressive symptoms was weaker among students with higher levels of physical exercise (simple slope = 0.283, t = 7.136, p < 0.001). This suggests that as the level of physical exercise increases, the impact of sleep quality on depressive symptoms gradually decreases.

Fig. 4
Fig. 4
Full size image

Simple slope diagram.

Discussion

This study yields several significant findings that advance our understanding of the complex relationships among sleep quality, depressive symptoms, and suicidal ideation in college students. The results establish sleep quality as a robust predictor of suicidal ideation, with depressive symptoms identified as a critical mediating factor. Importantly, physical exercise emerges as a significant moderator in the sleep quality-depression relationship. These findings not only elucidate the psychological mechanisms underlying the sleep-suicidality association but also reveal important behavioral pathways. By identifying both risk factors (poor sleep quality and depressive symptoms) and protective factors (physical exercise), this research provides a comprehensive theoretical framework that informs future investigations in this critical area of college student mental health.

The study demonstrates that sleep quality is associated with suicidal ideation among college students. This finding supports Hypothesis 1 and aligns with previous research55,56. Poor sleep quality can increase the risk of suicidal ideation by reducing an individual’s ability to cope with stress and the confidence to adopt positive coping strategies57. One longitudinal study revealed that poor sleep quality predicted increases in suicidal ideation 1 month later in college students and exacerbated suicidal ideation by increasing negative affect55. Biological evidence suggests that decreased sleep quality may lead to reduced prefrontal cortex functionality and impaired executive functioning, thereby increasing the risk of suicidal ideation and suicidal behaviors58. Serotonin appears to play a significant role in both sleep regulation and suicide. Serotonin release is highest during wakefulness, decreases during slow-wave sleep, and reaches its lowest levels during rapid eye movement sleep59. Dysfunction in serotonin neurotransmission, particularly reduced serotonin synthesis, is associated with diminished sleep quality59,60. Furthermore, serotonin dysfunction may play a critical role in conferring risk for suicide61, and the sensitivity of serotonin function is influenced by sleep loss itself62. In summary, the findings underscore the critical importance of addressing sleep quality as a modifiable risk factor in suicide prevention programs for college students. It is worth noting that the direct effect size of sleep quality on suicidal ideation (β = 0.130) is small, suggesting statistical significance but limited practical or clinical significance. Subsequent studies should further explore the independent variables influencing suicidal ideation, so as to better prevent and improve suicidal ideation among college students.

Furthermore, this study reveals that depressive symptoms play a mediating role in the relationship between sleep quality and suicidal ideation, supporting Hypothesis 2. Firstly, sleep quality has a positive effect on college students’ depressive symptoms. Research indicates that poor sleep quality impairs individuals’ ability to effectively utilize emotion regulation strategies, thereby exacerbating negative emotions63. Conversely, depressive symptoms are one of the key factors leading to poor sleep quality64. Poor sleep quality exacerbates existing difficulties in emotion regulation and cognitive control among individuals with depressive symptoms, potentially elevating their risk of suicidal behavior65. Neurobiological evidence suggests that poor sleep quality and depressive symptoms share similar neural connectivity foundations66. Secondly, depressive symptoms also have a positive effect on suicidal ideation. This finding is consistent with previous research67. Based on the theoretical framework of the Stress-Diathesis Model, this study conceptualizes suicidal behavior as the dynamic interplay between individual psychological vulnerabilities and environmental stressors68. Depression, as a core diathesis factor, drives suicidal ideation through mechanisms including disrupting emotional regulation, reinforcing negative cognitive biases, and triggering behavioral disinhibition69. Notably, the decline in sleep quality among college students may impair their ability to regulate negative emotions, potentially leading to the development of depressive symptoms, which in turn significantly heightens their vulnerability to developing suicidal ideation. This finding repositions sleep quality as a “stress-vulnerability interaction interface”, necessitating its integration as a population-specific predictive parameter within existing suicide risk models, particularly for college student cohorts. The study provides a theoretical basis for developing targeted interventions that address both sleep quality and depressive symptoms as interconnected factors in suicide prevention strategies.

The findings of the study demonstrate that physical exercise serves as a moderating factor in the relationship between sleep quality and depressive symptoms among college students, supporting Hypothesis 3. The distraction hypothesis offers a novel perspective on this phenomenon, suggesting that physical exercise provides individuals with an opportunity to shift their attention away from worries and frustrations. This cognitive diversion can effectively alleviate negative emotions such as anxiety and depressive symptoms70, thereby reducing suicidal ideation71. From a psychological perspective, physical exercise can reduce symptoms of depression by enhancing self-worth and self-esteem72. Physical exercise can bring pleasure, self-confidence, satisfaction, and other feelings that are completely opposite to the symptoms of depression73. From a neurobiological standpoint, the direct effects of physical exercise are primarily reflected in the neurobiological changes that accompany it, which influence depression. Exercise promotes the secretion of neurotransmitters such as dopamine, serotonin, and brain-derived neurotrophic factor (BDNF), improving brain function and thereby reducing negative emotions and alleviating depressive symptoms74,75. It is noteworthy that the direct association between physical exercise and suicidal ideation is relatively weak (r =  − 0.033). This finding suggests that physical exercise may reduce suicidal ideation indirectly by alleviating depressive symptoms, rather than through direct intervention on suicidal ideation. Solely increasing physical exercise may be insufficient to significantly reduce suicidal ideation, as its effect appears to depend more strongly on mediating pathways. In summary, this study provides compelling evidence that physical exercise moderates the mediating effect of depressive symptoms between sleep quality and suicidal ideation among college students. Furthermore, guided by the interpersonal theory of suicide and cognitive-behavioral framework76,77, this study delineates how physical exercise disrupts the pathological cascade of "sleep deterioration → cognitive distortions → depressive exacerbation → interpersonal risks (thwarted belongingness/perceived burdensomeness) → suicidal ideation" through dual psychobiological pathways. Specifically, impaired sleep quality diminishes prefrontal cortex-mediated cognitive control, triggering maladaptive appraisals (e.g., misinterpreting solitude as "social rejection," per cognitive-behavioral models). These cognitive biases not only intensify depressive symptoms but also drive behavioral avoidance (e.g., social withdrawal), thereby perpetuating a self-reinforcing cycle of "loneliness → self-devaluation" that activates core suicidal mechanisms: unmet belongingness needs ("I am unwanted") and burdensomeness cognitions ("My existence harms others"), as defined by suicide interpersonal theory. Regular exercise demonstrates bifunctional regulation: physiologically, it stabilizes hypothalamic–pituitary–adrenal (HPA) axis activity (e.g., cortisol rhythm normalization) to improve sleep architecture and mitigate neurobiological underpinnings of depression; psychosocially, group-based exercise fosters social connectedness through shared mastery experiences, directly addressing belongingness deficits, while skill progression reshapes burdensome self-schemas via enhanced self-efficacy. This unique capacity to concurrently target neurocognitive dysfunction and interpersonal-cognitive vulnerabilities positions physical exercise as a transdiagnostic intervention for decoupling the sleep-depression-suicidality nexus.

Limitations

Firstly, the cross-sectional design of this study and uncontrolled covariates constrain the validity of causal inferences. Although moderated mediation model testing and biological plausibility analyses indicated the robustness of core findings, future research should employ longitudinal designs (e.g., cross-lagged panel models), experimental designs, and causal inference approaches (e.g., instrumental variable methods) to verify these associations. Secondly, the students may include both healthy and depressed individuals, with no distinction made regarding depression. Future studies could incorporate more refined categorization of depressed individuals. Furthermore, this study did not conduct systematic diagnostic screening for mental disorders, which may affect the interpretation of the results. Future studies should employ standardized diagnostic tools, report the proportion of screening-negative participants, and analyze the effects of psychiatric symptoms on the primary outcomes. Thirdly, this study relies exclusively on subjective, self-reported measures of sleep quality and physical exercise, which may be susceptible to recall bias and social desirability effects. Future research incorporating objective assessments, such as actigraphy for sleep monitoring and wearable devices for physical activity quantification, could enhance measurement precision and ecological validity. Fourthly, the impact of self-report bias in psychological research warrants careful consideration, particularly when addressing sensitive topics such as suicidal ideation. Suicidal ideation represents a highly sensitive issue, and participants may underreport or conceal their true experiences due to social desirability bias or psychological defense mechanisms, thereby introducing measurement inaccuracies. Such biases could systematically distort findings in mediation models, potentially leading to either an underestimation or overestimation of the relationships between variables. To address these limitations, future research should prioritize longitudinal designs and experimental approaches to reduce reliance on self-reported data. Alternatively, developing more discreet measurement tools, such as implicit behavioral tasks or passive digital phenotyping, could enhance the validity of assessments for sensitive constructs.

Conclusion

This study explores the relationship between sleep quality, suicidal ideation, depressive symptoms, and physical exercise among college students. The findings reveal the mediating role of depressive symptoms in the relationship between sleep quality and suicidal ideation, as well as the moderating role of physical exercise in the relationship between sleep quality and depressive symptoms. In addition, we find that as the level of physical exercise increases, the effect of sleep quality on depressive symptoms gradually diminishes. The results highlight the importance of addressing sleep quality, depressive symptoms, and physical exercise among college students to prevent the occurrence of suicidal ideation. Schools and families should pay close attention to these factors and provide regular psychological counseling and exercise intervention guidance to improve college students’ mental well-being.