Background

Sleep is an essential physiological activity for humans. With the rapid development of society and the acceleration of life’s pace, people’s lifestyles have undergone significant changes, which in turn have had a profound impact on people’s sleep. The World Health Organization has reported that about 27% of the world’s population has experienced sleep disturbances [1]. In China, college students are a high-incidence group for sleep problems, with a prevalence rate of 25.7% [2]. Alarmingly, this rate is not static but shows a consistent upward trend year over year [3]. Good sleep quality is crucial for preventing and alleviating mental health problems, contributing significantly to an individual’s overall quality of life and happiness [4, 5]. Conversely, poor sleep quality not only easily leads to mental problems such as emotional disorders, cognitive dysfunction and self-harm behaviors [6,7,8], but it also damages the immune system, resulting in various diseases [9]. Thus, thoroughly investigating the psychological factors and their underlying mechanisms that contribute to enhancing sleep quality among university students is crucial.

Perceived stress is a comparatively stable process of perception, characterized by an individual’s subjective appraisal of stress intensity when confronted with stimulative events from within or outside. This process can shift cognitive functions and impact emotional and behavioral reactions [10]. According to the "non-homeostatic" theory of stress, long-term stress will lead to functional disorders and exhaustion in the body, presenting a "non-homeostatic" physical and mental condition, characterized by endocrine system disorders, excessive emotional arousal, sleep disorders et al. [11]. Perceived stress has been proved to be a significant factor affecting the sleep quality of college students [12,13,14], with a study involving college students from seven countries found that higher levels of perceived stress were associated with poorer sleep quality [15]. Moreover, the effect of perceived stress on sleep quality was influenced by other psychological factors [16]. Therefore, considering these complex interactive relationships is crucial when studying the impact of perceived stress on sleep quality.

The presence of meaning in life (PML) is an important psychological cognitive resource, referring to an individual’s comprehension of the meaning of their life and the recognition of their life’s purpose, goals, and mission [17]. PML plays a significant role in optimizing physical condition and mental health [18, 19]. Research has found that having a greater sense of meaning in life contributes to improved sleep quality, including extended sleep duration and reduced sleep disturbances [20, 21]. According to the cognitive model of insomnia, cognitive processes are one of the significant reasons for the onset and progression of sleep problems. Excessive focus on sleep-related stimuli can lead individuals to overestimate the negative impact on their sleep, resulting in cognitive biases and disrupting the sleep’s automatic processes [22]. In addition, individuals with high levels of perceived stress frequently report a reduced PML due to the significant psychological resources expended on stress management [23]. The lack of PML may lead individuals to fall into negative emotional states more easily, thereby intensifying emotional disturbances and cognitive alertness [24], which in turn adversely affects sleep quality. This indicates that PML may act as a significant mediator in the relationship between perceived stress and sleep quality.

Depression is a common emotional problem in adolescence, which refers to a painful, low, and sad emotional experience caused by an individual’s inability to cope with internal and external stress [25]. The relationship between perceived stress and depression is notably strong among college students, with rising levels of perceived stress being increasingly associated with the emergence of depressive symptoms [26, 27]. Depression, representing a significant negative emotion, emerges as one of the most critical predictors of sleep problems [28, 29]. Findings indicate that adolescents suffering from depression face greater challenges in falling asleep and generally poorer sleep quality [30]. It is important to note that there is substantial evidence for the bidirectional nature of the relationship between depression and sleep quality [31, 32], with insomnia also potentially being a risk factor for the development of depression [33]. However, our study focuses on depression’s role as an emotional state rather than as a symptom of sleep disorders. According to the theory of sleep disturbance processes, excessive emotional arousal disrupts the natural sleep cycle, leading to sleep issues [34]. Therefore, depression may serve as a mediator between perceived stress and sleep quality among college students.

The cognitive appraisal theory of emotions provides a significant framework for understanding individuals’ responses to stressors. It suggests that upon encountering potential stressors, individuals initially conduct a cognitive assessment using their cognitive system. This assessment is followed by the elicitation of related emotional responses, which then guide the selection of targeted behavioral strategies for addressing the stress situation encountered [35]. Based on this theory, when individuals perceive higher levels of stress, they are more likely to form negative cognitive-emotional connections. These connections may manifest as a linkage between low PML and high depression, ultimately affecting sleep quality. Thus, there may be a chain mediating role of PML and depression in the influence of perceived stress on sleep quality.

Search for meaning in life (SML), representing another crucial dimension of meaning in life, is a fundamental human motivation. It refers to the efforts devoted by individuals towards constructing a coherent understanding of their existence, identifying clear objectives for their life, and uncovering the inherent value of their being [17]. PML and SML are independent and complementary, both contributing to individual development. However, compared to PML, the effect of SML on individual psychological health is not consistent, sometimes even having a counterproductive effect [36]. On the one hand, SML is associated with a number of personality traits that symbolize positive qualities [37], which have a protective effect on adolescent development and show gainful effects. Research has found that enhancing the SML can prevent individuals from dwelling in suffering, effectively reducing the frequency of risk issues following negative stimulus [38, 39]. On the other hand, the SML may have a negative impact in the absence of the PML. Specifically, engaging excessively in SML without a solid foundation of PML can lead to emotional distress and psychological pain, diverting from a path to fulfillment and psychological well-being [40, 41]. In such circumstances, even if the level of PML is incrementally increased, SML may actually inhibit positive psychological development, exhibiting a discounting effect. Therefore, while the SML is inherently valuable, ensuring that this endeavor is balanced and anchored in a realistic appreciation of one’s present life circumstances and existing meaning frameworks is essential. Studies have found that meaning in life has a protective effect on sleep quality [42]. However, the impact of SML on sleep quality has rarely been discussed independently. Whether it exerts gainful effects or a discounting effect remains to be determined. Therefore, the present study was conducted for exploratory purposes to analyze the moderating role of SML in influencing sleep quality in order to more fully understand the role of meaning in life on sleep quality.

By reviewing previous studies, we found that there have been abundant studies on the relationships among perceived stress, depression and sleep quality, but the specific mechanisms through which PML and SML operate in these relationships remain underexplored. Although PML and SML are related to psychological health, their impacts on sleep quality have not been thoroughly explored, particularly across different cultural contexts. Many studies have focused on isolated variable relationships, often neglecting the interactive roles of these factors in complex psychological and emotional states. Therefore, more comprehensive studies are needed to fully consider these interactions. To fill these gaps, the present study constructed a moderated chain mediation model to examine the multiple mediating roles of PML and depression in the relationship between perceived stress and sleep quality, and to explore the moderating effect of SML on the pathway to sleep quality (see Fig. 1). In conclusion, this research aims to test the following hypotheses:

  • H1. Perceived stress significantly predicts college students’ sleep quality.

  • H2. Perceived stress impacts sleep quality through a chain mediation effect of PML and depression.

  • H3. SML moderates the relationship between perceived stress and sleep quality.

  • H4. SML moderates the relationship between PML and sleep quality.

  • H5. SML moderates the relationship between depression and sleep quality.

Fig. 1
figure 1

The moderated chain mediation model in this study. Fig. 1 displays the moderated chain mediation model investigated in this study, focusing on the relationship between perceived stress and sleep quality, with PML and depression serving as chain mediators. It also elucidates the moderating role of SML in the three paths of the chain mediation

Methods

Participants and procedures

This study used convenience sampling to recruit participants. After obtaining approval from the school administration, we recruited college students from a university in Hunan Province. A total of 8,822 students voluntarily participated in the study. To enhance the representativeness of the sample, we ensured that the participants included students from different academic years, genders, and disciplines. Participants received an online link to the survey, directing them to complete it, including an informed consent form and the measurement tools used in the current study. Moreover, they were assured anonymity and informed that they were not obligated to participate and could withdraw whenever they wanted. Data collection occurred during the regular term time, and the survey was conducted during students’ out-of-class hours, allowing them to complete it at their convenience. Due to 644 participants not fully complete the questionnaire, a total of 8,178 valid questionnaires were obtained, resulting in an effective response rate of 92.70%. Of these, there were 4599 males (56.24%) and 3579 females (43.76%); 1,508 were only children (18.44%), while 6670 had siblings (81.56%). The average age of the participants was 19.10 ± 1.08 years.

Measures

The Perceived Stress Scale (PSS)

This study used the perceived stress scale developed by Cohen to assess how often college students perceive their life as stressful during the past month before the survey [10]. PSS consists of 14 items and two dimensions: sense of uncontrollable and sense of nervous. Each participant was rated on a 5-point Likert scale from 1 (never) to 5 (very often). Higher scores indicate a higher level of perceived stress. The scale has good reliability and validity in Chinese college students [43]. In this study, the Cronbach’s α coefficient of the scale was 0.73.

Pittsburgh Sleep Quality Index (PSQI)

This study used the Pittsburgh Sleep Quality Index, which was developed by Buysse et al. [44], to assess the sleep quality of subjects over the past month. The PSQI is a self-rating questionnaire with 19 questions and seven factors, including subjective sleep quality, sleep latency, sleep duration, sleep efficiency, sleep disturbances, use of sleep medication, and daytime dysfunction. Each of the factors yields a score ranging from 0 to 3, and the sum of the scores from the seven factors represents an individual’s sleep quality, with a range of 0–21. Higher score indicates worse sleep quality. The Chinese version of PSQI has been widely used in the evaluation of sleep in other regions of China, with good reliability and validity [45] In this study, the Cronbach’s α coefficient of the scale was 0.74.

Meaning in Life Questionnaire (MLQ)

The Meaning in Life Questionnaire developed by Steger et al. [17] was used to assess two dimensions of meaning of life: the presence of meaning (PML) and the search for meaning (SML). The PML dimension measures individuals’ perceived sense of purpose and value in life, with items such as "I understand my life’s meaning," while the SML dimension assesses their tendency to seek or pursue a sense of meaning and purpose, with items such as "I am always looking to find my life’s purpose." Both dimensions include five items each. The Chinese version was used in this study, employing the 7-point Likert scale from 1 (strongly disagree) to 7 (strongly agree), with higher scores representing higher levels of meaning in life [46]. In this study, the Cronbach’s α coefficients of PML and SML were 0.73 and 0.95, respectively.

Patient health questionnaire-9 (PHQ-9)

The Patient Health Questionnaire-9 (PHQ-9) developed by Kroenke et al. was used to assess the frequency of depressive symptoms in the past two weeks among the subjects [47]. The scale consists of 9 items on a 4-point scale that ranged from 0 (not at all) to 3 (almost every day) with a total score ranging from 0–27. Higher scores indicate more severe depressive symptoms. The PHQ-9 has been widely used in Chinese adolescence and shows great reliability and validity [48]. In this study, the Cronbach’s α coefficient of the scale was 0.93.

Data analysis

Statistical analyses were conducted using IBM SPSS version 25.0. Firstly, the Harman single-factor test was performed to assess common method bias [49], with the total variance extracted by the first factor being below 40%, indicating the absence of common method bias. Subsequently, descriptive statistics were used to present the demographic characteristics of the participants, and Pearson correlation coefficients were applied to examine the relationships among perceived stress, PML, depression, SML and sleep quality. In the third phase, the chain mediation effect of PML and depression between perceived stress and sleep quality was examined using the PROCESS macro for SPSS (Model 6) [50]. Finally, the moderating role of SML in the chain mediation model was tested using the PROCESS macro (Model 89) [50]. Simple slope analysis was performed, reporting conditional effects at high and low levels of SML. Both models controlled for gender, age, and only-child status. A bootstrap test with 5,000 repeat samplings was conducted to assess statistical robustness, with a 95% confidence interval (CI) not encompassing 0 indicating a significant effect.

Results

Inspection and control of common method bias 

Since data were collected using a self-reported method, the results may be affected by common method bias. To counter this, along with employing anonymous testing and reverse scoring, the study applied Harman’s single factor test, utilizing a non-rotated principal component analysis. The data generated a total of 7 common factors with a characteristic value greater than 1, and the interpretation amount of the first factor was only 28.41%, less than 40%, indicating the absence of significant common method bias in the data.

Descriptive statistics and correlation analysis

Table 1 presents the means, standard deviations and Pearson’s correlation coefficients for perceived stress, PML, SML, depression and sleep quality. The results showed that there were significant correlations among the variables studied. Specifically, perceived stress was significantly positively correlated with depression (r = 0.44, p < 0.001), sleep quality (r = 0.38, p < 0.001, higher PSQI scores indicating poor sleep quality), and significantly negatively correlated with PML (r = -0.52, p < 0.001) and SML (r = -0.32, p < 0.001). PML was significantly negatively correlated with depression (r = -0.32, p < 0.001) and sleep quality (r = -0.28, p < 0.001). Depression was significantly positively correlated with sleep quality (r = 0.58, p < 0.001). SML was significantly negatively correlated with sleep quality (r = -0.19, p < 0.001).

Table 1 Correlations and descriptive statistics (n = 8178)

The moderated chain mediation model test

Firstly, model 6 in the IBM SPSS macro program PROCESS compiled by Hayes was used to explore the chain mediating effect of PML and depression in the relationship between perceived stress and sleep quality after standardized all the variables (Table 2). The results show that perceived stress had a significant predictive effect on sleep quality (β = 0.37, t = 36.43, p < 0.001), supporting Hypothesis H1. After introducing the PML and depression, the predictive effect of perceived stress on sleep quality was still significant (β = 0.14, t = 12.46, p < 0.001), in which perceived stress has a significant negative predictive effect on PML (β = -0.52, t = -54.19, p < 0.001), and PML had a significant negative predictive effect on sleep quality (β = -0.04, t = -3.94, p < 0.001). Perceived stress had a significant positive predictive effect on depression (β = 0.36, t = 31.22, p < 0.001), and depression had a significant positive predictive effect on sleep quality (β = 0.50, t = 50.54, p < 0.001). Finally, PML was significantly negatively associated with depression (β = -0.13, t = 11.45, p < 0.001), forming a serial mediation pathway that supported Hypothesis H2.

Table 2 Analysis of variable relationship in chain mediation model

The bootstrap test results (Table 3) showed that PML and depression partially mediated the relationship between perceived stress and sleep quality. Specifically, the mediating effect was composed of indirect effects generated by three pathways: (1) perceived stress → PML → sleep quality, accounting for 8.33% of the total effect; (2) perceived stress → depression → sleep quality, accounting for 79.17% of the total effect; (3) perceived stress → PML → depression → sleep quality, accounting for 12.50% of the total effect.

Table 3 Bias-corrected Bootstrap tests of mediating effects

Further, Model 89 in the SPSS PROCESS macro program was used to test the moderating role of SML in the pathway of perceived stress → PML → depression → sleep quality. The results showed that SML significantly predicted sleep quality (β = -0.03, t = -2.27, p < 0.05), with higher SML being associated with better sleep quality. The interaction between perceived stress and SML significantly predicted sleep quality (β = -0.02, t = -2.28, p < 0.05), suggesting that SML plays a moderating role in the influence of perceived stress on sleep quality, supporting Hypothesis H3. In order to reveal how SML moderated the relationship between perceived stress and sleep quality, a simple slope test was conducted. The simple effect analysis diagram was drawn (Fig. 2) based on SML by grouping high and low (plus or minus a standard deviation). The results showed that perceived stress significantly affects sleep quality for both high and low levels of SML. However, compared to college students with a high SML (simple slope = 0.12, t = 9.01, p < 0.001), perceived stress has a stronger predictive effect on the sleep quality of college students with a low SML (simple slope = 0.16, t = 8.77, p < 0.001).

Fig. 2
figure 2

Moderation role of SML in the relationship between perceived stress and sleep quality. Fig. 2 demonstrates the moderating role of SML in the relationship between perceived stress and sleep quality, with dashed lines representing high SML and solid lines representing low SML. It is important to note that higher sleep quality scores indicate poorer sleep quality. The results suggest that the negative impact of perceived stress on sleep quality is greater at low levels of SML

The interaction of PML and SML significantly predicts sleep quality (β = -0.06, t = -8.19, p < 0.001), indicating that SML moderates the relationship between PML and sleep quality, supporting Hypothesis H4. To explain the essence of the interaction between PML and SML, a simple slope analysis was performed (Fig. 3). The results showed that among college students with high levels of SML, the negative predictive effect of PML on sleep quality was significant (simple slope = -0.11, t = 6.35, p < 0.001). Among college students with low levels of SML, the effect of PML on sleep quality was not significant (simple slope = 0.01, t = 0.39, p > 0.05).

Fig. 3
figure 3

Moderation role of SML in the relationship between PML and sleep quality. Fig. 3 shows the moderating role of SML between PML and sleep quality, with the dashed line representing high SML and the solid line representing low SML. Higher sleep quality scores indicate poorer sleep quality. The results suggest that PML has a more positive effect on sleep quality at higher levels of SML

In addition, the interaction between depression and SML was a significant predictor of sleep quality (β = -0.03, t = -2.83, p < 0.01), indicating that SML moderates the effect of depression on sleep quality, supporting Hypothesis H5. To explain the substance of the interaction between depression and SML, a simple slope analysis was performed (Fig. 4). The results showed that the negative impact of depression on sleep quality was attenuated in individuals with high SML (simple slope = 0.46, t = 30.03, p < 0.001) compared to those with low SML (simple slope = 0.50, t = 43.71, p < 0.001).

Fig. 4
figure 4

Moderation role of SML in the relationship between depression and sleep quality. Fig. 4 shows the moderating effect of SML between depression and sleep quality, with the dashed line representing high SML and the solid line representing low SM. Higher sleep quality scores indicate poorer sleep quality. The results suggest that the negative impact of depression on sleep quality is greater at low levels of SML

Discussion

Focusing on the effects of perceived stress on sleep quality, this study further examined the mediating role of PML and depression, and tested the moderating role of SML. The findings illuminate the underlying mechanisms through which perceived stress affects sleep quality, offering valuable insights for enhancing sleep quality among college students.

Perceived stress on sleep quality

In this study, the negative predictive effect of perceived stress on sleep quality was further confirmed, aligning with the life experience that greater stress leads to poorer sleep [15], highlighting the potential harm of psychological stress on sleep health. It is commonly believed that individuals with high perceived stress are more likely to experience sleep problems, which can be explained from both physiological and psychological perspectives. On one hand, sustained stress can activate the body’s stress response system, leading to changes in hormone levels such as cortisol, which may disrupt sleep regulation mechanisms, like sleep cycles and depth [51]. On the other hand, perceived stress often leads to negative emotions such as anxiety and depression, which can result in excessive night-time rumination and worry, negatively impacting sleep [16, 52].

The mediating role of PML and depression

The mediation effect analysis indicates that perceived stress impacts sleep quality through a serial mediation involving PML and depression. Firstly, the mediating role of PML between perceived stress and sleep quality was confirmed, highlighting the significant role of internal cognitive factors on sleep quality. Perceived stress, a threat to sleep, often brings unpredictability to events, leading individuals to question their life goals and values [53], and resulting in psychological turmoil and a sense of meaninglessness that undermines the PML. Furthermore, a compromised PML can increase psychological tension and cognitive burden, causing individuals to ruminate over their existence and life direction at night. Such reflections, often laden with concerns and anxieties about the future, can disrupt normal sleep patterns.

Secondly, depression serves as a bridge through which perceived stress affects sleep quality. This finding not only responds to previous research, confirming depression as a key risk factor in sleep quality triggered by perceived stress [54], but also corresponds with the sleep disturbance processes theory. According to this theory, emotional arousal, particularly stemming from depressive emotions due to perceived stress, can significantly disrupt sleep [34]. Triggered by perceived stress, these psychological stress responses precipitate negative emotional states closely tied to sleep, like anxiety and depression. Such emotions impair the brain’s mechanisms regulating sleep and wakefulness, potentially leading to a spectrum of sleep issues, including difficulties in falling asleep, maintaining sleep, or experiencing irregular sleep cycles [30]. Moreover, the interaction between depression and sleep could further exacerbate an individual’s psychological stress, creating a vicious cycle.

Additionally, this study discovered that perceived stress indirectly affects sleep quality through a serial mediation of PML and depression, supporting the cognitive appraisal theory of emotions [35]. It provides a new perspective on understanding the relationship between perceived stress and sleep quality. PML significantly negatively predicts depression, consistent with previous research findings [55]. It reflects the indispensability of PML for maintaining mental health and constructing a happy life. PML prompts individuals to continuously reflect, assess and construct their life goals and values [56], A high level of PML not only enhances individuals’ coping ability in the face of stress and change, but also helps them to obtain sufficient psychological energy. When psychological energy is depleted by stress, they may lack sufficient resources to maintain and develop the PML. And the weakening of PML may easily lead individuals to fall into a pessimistic thinking pattern and focus excessively on the negative aspects of life, which in turn triggers the development of depression [55], and ultimately adversely affects the quality of sleep. These findings highlight the importance of addressing both PML and depression in interventions aimed at improving sleep quality. By focusing on enhancing individuals’ sense of purpose and meaning, and managing depression, college students can potentially mitigate the negative impacts of perceived stress on sleep.

The moderation role of SML

Another important result of the present study is the discovery of the moderating role of SML, which implies that the extent of the effects of perceived stress, PML and depression on sleep quality changes at different SML levels.

Firstly, SML moderated the effect of perceived stress on sleep quality as well as the effect of depression on sleep quality. Specifically, perceived stress and depression had a less negative effect on sleep quality when individuals had higher levels of SML compared to low levels of SML. This result suggests that SML plays a stable and protective role in the effects on sleep quality, showing a gain effect rather than a discount effect. Among college students, SML may be a healthy and developmentally appropriate meaning orientation. The core of SML lies in an individual’s intrinsic motivation, which can buffer the impact of internal stress and negative emotions on the sense of meaning, helping individuals maintain psychological balance and health [57]. College students with a high level of SML are less affected by stress and depressive emotions. This may be because the process of searching for meaning offers individuals the opportunity to reinterpret these stressful events, reducing the discrepancy between the significance attributed to the events and overall meaning, thereby restoring a positive attitude and cognition towards life [58].

Moreover, this study found that SML moderates the impact of PML on sleep quality. Specifically, a high level of SML can enhance the positive effect of PML on sleep quality. Under conditions of low SML, although the impact of PML on sleep quality is not significant, it shows a negative effect, which is an interesting finding. Students with a high SML might possess ample intrinsic motivation, and a strong sense of life goals and meaning that provides them with psychological satisfaction and emotional stability. This intrinsic motivation helps them avoid the depletion of psychological resources and equips them with the ability to reshape and seek new meanings, enabling them to better adapt to changes and achieve positive outcomes [38]. This provides a positive psychological resource for good sleep quality. In contrast, students with a lower SML might rely on external factors and be less sensitive to the intrinsic PML. They may struggle to discover or recognize the significance and purpose in life. In such cases, even if they experience some sense of meaning, its positive impact on sleep quality may be diminished because their fundamental motivation for seeking meaning is not satisfied. Moreover, a low level of SML can lead to more negative emotions and psychological states, all of which are adverse factors for sleep quality. Therefore, the impact of PML on sleep quality is not significant for college students with a low SML. These findings highlight the importance of promoting SML as a key factor in improving sleep quality. Encouraging students to actively engage in meaningful activities can positively impact their mental health [59], leading to better sleep outcomes. This suggests that incorporating strategies to boost SML into mental health and sleep quality programs could be highly beneficial.

Limitations and future research

The findings of this study should be considered in light of several limitations. The most significant limitation is the use of a cross-sectional design. This design prevents us from making causal inferences. To overcome this limitation, future research should employ a longitudinal design. This will provide a clearer understanding of how these relationships develop over time and help establish causal pathways between perceived stress, PML, SML, depression, and sleep quality. Another limitation is the reliance on self-reported measures, which may introduce biases such as social desirability. Future studies should employ multi-method approaches, including behavioral assessments and third-party evaluations, to enhance the objectivity of the data. Additionally, this study was conducted at a single university in Hunan, China, which may limit the generalizability of the findings. Future research should include more diverse samples from various regions, educational institutions, and cultural contexts to improve the external validity of the results and explore how cultural and geographical factors influence the relationships between these variables.

Conclusion

This study confirmed the chain mediating roles of PML and depression between perceived stress and sleep quality, helping to understand the potential mechanisms affecting sleep quality from a mental health perspective. Therefore, interventions should encourage college students with high perceived stress to enhance their PML and reduce depression to improve their sleep quality. Another finding suggests that SML moderates the impact of perceived stress, PML and depression on sleep quality. This result highlights the protective role of SML, buffering against the negative impacts of stress and depression on sleep quality and strengthening the positive effects of PML on sleep quality. Therefore, incorporating strategies to enhance the SML could be a valuable approach in interventions aimed at improving sleep quality.