Abstract
Background
Shift work has been associated to a higher risk of depression and other health problems.
Objective
This study aims to explore the connection between shift work and depression using NHANES data, with a focus on the roles of sleep duration and physical activity.
Methods
NHANES data from 2007 to 2010 were examined using weighted multivariable logistic regression and stratified analysis, adjusting for demographic, chronic disease, and lifestyle factors. The impact of sleep duration and physical activity on depression among shift workers was examined using generalized additive models.
Results
The study included 4965 participants. Adjusting for all covariates, shift work was significantly linked to increased depression risk (OR = 1.25, 95% CI: 1.05–1.48, p = 0.0127). For shift workers, each additional hour of sleep reduced depression risk by 19% (OR = 0.81, 95% CI: 0.72–0.91, p = 0.0007), and those with adequate sleep had a 40% lower depression risk compared to those with insufficient sleep (OR = 0.60, 95% CI: 0.42–0.87, p = 0.0072). Regular physical activity reduced depression risk by 44% (OR = 0.56, 95% CI: 0.36–0.87, p = 0.0104), whereas insufficient activity showed no significant impact (OR = 0.83, 95% CI: 0.50–1.38, p = 0.4731).
Conclusions
Shift work increases depression risk, while sufficient sleep and physical activity are protective. These findings underscore the importance of improving conditions for shift workers and developing preventive strategies.
Keywords
Introduction
Shift work is a widely used scheduling practice in industries such as healthcare, manufacturing, transportation, and services. It involves employees working non-traditional hours, including night shifts, early shifts, and rotating shifts. 1 With the rapid development of the global economy and increasing demand for 24-h services, the prevalence of shift work has significantly increased. According to the International Labour Organization, approximately 20% of the global workforce is engaged in shift work. 2 While this work arrangement contributes positively to socioeconomic development, additionally, it could endanger the workers’ physical and mental health.3,4
Depression is a serious mental illness that ranks among the world's primary causes of morbidity and disability. According to World Health Organization statistics, depression affects over 264 million people globally and is a major contributing factor to suicide, resulting in approximately 800,000 deaths annually.5,6 The characteristics of depression include persistent sadness, loss of interest, reduced energy, sleep disturbances, and suicidal thoughts. 7 An extensively used tool for identifying, diagnosing, and gauging the degree of depression is the Patient Health Questionnaire-9 (PHQ-9). According to the PHQ-9 scoring criteria, a score of 5 or above is defined as mild depression, aiming to capture cases with potentially subtle symptoms that require timely identification and intervention. 8
Studies have shown that shift work may raise the risk of depression through a number of different processes, including circadian rhythm disruption, decreased sleep quality, restricted social life, and accumulated chronic stress.9,10 Vetter et al., for example, discovered a substantial correlation between shift employment and an elevated risk of coronary heart disease, 11 which is known to be a risk factor for depression. Additionally, Buxton et al.demonstrated through experimental studies that prolonged sleep restriction and circadian disruption lead to adverse metabolic outcomes and mental health issues. 12 Moreover, regular physical activity (PA) is widely recognized as beneficial in alleviating depressive symptoms and improving mental health. PA enhances mood and mental well-being through various pathways, such as increased endorphin secretion, 13 improved sleep quality, enhanced self-esteem, and better social interaction. 14 For shift workers, a well-planned exercise regimen could potentially mitigate the negative impacts of their work schedule and improve overall mental health. 15 Although shift work and depression have been the subject of several studies, the majority of these studies concentrate on mild to severe depression,16,17 leaving unanswered the roles that sleep length and PA patterns contribute in shift workers. This study uses the PHQ-9 with a score of 5 or above to identify mild and above depression, providing a more sensitive detection method. Using nationally representative National Health and Nutrition Examination Survey (NHANES) data, this research systematically investigates the associations between shift work, sleep duration, PA patterns, and early-stage depression. The findings aim to provide scientific evidence for future longitudinal studies and public health policies, ultimately improving workers’ mental health.
Methods
Study participants
Using data from the NHANES for 2007–2010, the impacts of work patterns on mental health was investigated. NHANES is a cross-sectional survey that is nationally representative and gathers extensive data on questionnaires, examinations, lab tests, and demographics. The NHANES website (https://www.cdc.gov/nchs/nhanes/index.htm) has these data available to the general public. From an initial cohort of 20,686 participants, exclusions were applied: 14,253 participants were excluded due to not working or uncertain job status; 938 were excluded for missing PHQ-9, sleep duration, and PA data; and 530 were excluded due to age constraints (under 18 or over 65 years old). After these exclusions, the final sample comprised 4965 participants, as shown in Figure 1.

Flow chart showing the NHANES 2007–2010 participants’ selection.
Study variables
The status of shift employment is the independent variable in this study. The participants shared the three months’ worth of their overall work schedule. The responses were divided into two categories: shift workers (which includes regular evening shift, regular night shift, and rotating shift) and non-shift workers (those following a standard 9 AM to 5 PM daytime schedule). 18
Moderating variables include sleep duration and PA patterns. Sleep duration was assessed by asking participants about their usual sleep duration on workdays or workday nights. Sleep duration was categorized into two groups: non-short sleep duration (≥7 h per night) and short sleep duration (<7 h per night). 19
The Global Physical Activity Questionnaire was used to evaluate PA. The frequency (times per week) and length (minutes each session) of vigorous and moderate-intensity exercises lasting longer than ten minutes were reported by the participants. Vigorous activities significantly increased breathing or heart rate, while moderate activities slightly increased them. 20 According to guidelines, one minute of strong activity is equal to two minutes of moderate-intensity exercise. 21 Therefore, the total PA time was calculated as: 2 * vigorous activity time + moderate activity time. The total frequency was the sum of moderate and vigorous activity frequencies. Based on thresholds of 150 min of total PA time per week and a total frequency of 2 times, PA patterns were categorized into three groups: (1) Inactive: no vigorous or moderate PA; (2) Insufficiently active: total PA time less than 150 min per week; (3) Regularly active: at least 3 PA sessions per week with a total duration of at least 150 min.
Depressive symptoms throughout the previous two weeks are measured by the PHQ-9. Scores vary from 0 to 3, with responses ranging from “not at all” to “nearly every day.” The total score ranges from 0 to 27. Mild depression is a PHQ-9 score of 5–9, and major depression is 10 or above. To identify depression risk more sensitively, this study defines the outcome as a PHQ-9 score of 5 or above, including both mild and major depression. 22
Covariate assessment
The multivariable models incorporated potential confounding variables that might influence the association between shift work and depression, based on earlier studies. The demographic data, drinking and smoking, diabetes, hypertension, coronary heart disease, and hyperlipidemia were all them. Age, gender, ethnicity, level of education, poverty-income ratio (PIR), and marital status were regarding the demographic data. Three groups were created based on educational attainment: college or above (>12 years), middle and high school (9–12 years), and less than primary school (<9 years). Living alone and partnered were the two categories of marital status. The PIR was used to divide the income status into two categories: low-income (PIR ≤ 1.3) and non-low-income (PIR > 1.3). 23 The three categories of Body Mass Index (BMI) are: Underweight (≤24.99 kg/m²), Overweight (25.0–29.99 kg/m²), and Obese (≥30.0 kg/m²).
Information for medical history was obtained through interviews conducted in households. People with hypertension were classified as those who were either actively using antihypertensive medication or had received a previous diagnosis of hypertension. Diabetes was defined as having received a previous diagnosis of the disease or as being on hypoglycemic medication at the time of diagnosis. Hyperlipidemia was characterized as having a prior diagnosis of the condition or as being on lipid-lowering medication at the time of diagnosis. Participants who answered “yes” to the question “Has a healthcare provider ever told you that you have coronary heart disease?” were classified as having coronary heart disease. Whether or not participants had smoked at least 100 cigarettes during their lifetime was used to define their smoking status. Whether or not participants had drank at least 12 alcoholic beverages in the previous year was used to determine their alcohol consumption status.
Statistical analysis
We considered into account the weights supplied by the NHANES database while analyzing the data. Categorical variables were shown as counts and percentages (%), whereas continuous variables were shown as mean ± standard deviation. To handle missing data, multiple imputation methods were employed to ensure the robustness and completeness of the dataset. This approach allows for the uncertainty about the missing data to be incorporated into the analysis, providing more reliable estimates. Weighted chi-square tests were used to evaluate differences in categorical data and weighted linear regression models were used to study differences in continuous variables.
Weighted logistic regression was used to investigate the association between shift work and the prevalence of depression in adults under 65. For two models, odds ratios (ORs) and 95% confidence intervals (CIs) were computed: Model 1: Age, gender, racial background, education level, poverty-income ratio, and marital status adjustments were made. Model 2: Additional adjustments were made for hypertension, hyperlipidemia, diabetes, coronary heart disease, smoking, and alcohol use.
To test the interaction and effect of related confounding factors, we conducted stratified analyses and subgroup interaction tests, performing sensitivity analyses based on demographic factors.
Next, we analyzed the relationship between PA patterns and sleep duration with depression prevalence in shift workers using weighted logistic regression, calculating ORs and 95% CIs for two models. Furthermore, we utilized fitted curve methods and generalized additive models (GAM) to evaluate the dose-response association between depression prevalence and sleep duration.
R software (http://www.R-project.org) and EmpowerStats (version 5.0; www.empowerstats.com; X&Y Solutions Inc.) were used for all data analyses. For every statistical test, a p-value of less than 0.05 was deemed statistically significant.
Results
Characteristics of the study participants
Table 1 shows the baseline characteristics of U.S. adult workers under 65 years old, categorized by shift work status. Among the 4965 participants, 3996 were non-shift workers, and 969 were shift workers. Shift workers were significantly younger than non-shift workers (38.30 ± 13.20 vs. 42.27 ± 12.17, p < 0.001), with no significant difference in mean BMI (29.05 ± 6.96 vs. 28.87 ± 6.39, p = 0.466). A higher proportion of shift workers had an education level of elementary school or less (24.87% vs. 22.75%), while a lower proportion had a college education or above (47.68% vs. 54.88%, p < 0.001). The proportion of Mexican Americans was lower among shift workers (19.71% vs. 21.57%, p < 0.001). Shift workers had a lower proportion of individuals living alone (49.74% vs. 67.02%, p < 0.001) and a lower proportion of low-income individuals (66.46% vs. 77.88%, p < 0.001). The prevalence of hypertension (19.5% vs. 22.9%, p = 0.023) and hyperlipidemia (28.38% vs. 31.81%, p = 0.039) was lower among shift workers, while the prevalence of depressive disorders was higher (27.04% vs. 19.79%, p < 0.001). A higher proportion of shift workers had short sleep duration (<7 h) (49.02% vs. 38.74%, p < 0.001), and there was no significant difference in PA patterns between the groups (p = 0.179).
Baseline characteristics of U.S. adult workers under 65 years.
Associations of shift work with the prevalence of depression
Table 2 presents the multi-model analysis weighted connection between shift work and depressive disorder. In Model 1 (the unadjusted model), shift workers had a 1.50 times higher risk of depressive disorder compared to non-shift workers (OR = 1.50, 95% CI: 1.28–1.77, p < 0.0001). After adjusting for gender, race, age, income, marital status, and education level (Model 2), the risk remained significantly higher (OR = 1.32, 95% CI: 1.12–1.56, p = 0.0012). Taking into account additional factors such as cholesterol, hypertension, diabetes, heart disease, smoking, alcohol intake, length of sleep, and pattern of PA (Model 3), shift workers still showed a higher risk of depressive disorder (OR = 1.25, 95% CI: 1.05–1.48, p = 0.0127).
Weighted relationship between shift work and depressive disorder.
Odds ratios (ORs), 95% confidence intervals (CIs), and p-values are used to display the data. Model 1 is the unmodified model. Model 2: adjusted for age, income, married status, gender, race, and education level. Model 3: based on Model 2, further adjusted for smoking status, alcohol use, blood pressure, diabetes, hyperlipidemia, sleep duration, and PA pattern.
Stratified analysis
We performed subgroup analyses based on age, gender, education level, race, income level, and marital status (Figure 2). The results showed that the relationship between shift work and depression was consistent across all subgroups, and the interaction tests for each subgroup were not significant.

Subgroup analysis of the relationship between the prevalence of shift work and depression. The following text is the annotation: “Adjusted for gender, race, age, income, marital status, education level, hypertension, cardiovascular disease, diabetes, hyperlipidemia, smoking status, alcohol consumption, sleep duration, and PA pattern based on Model 2, except for the stratified factor itself.”
The relationship between sleep duration and pa patterns with the prevalence of depression in shift workers
Table 3 presents the results of a multivariable analysis examining the weighted relationship between sleep duration, PA patterns, and depression among shift workers. In Model 3, after adjusting for all variables, the results showed that each additional hour of sleep was associated with a 19% reduction in the risk of depression (OR = 0.81, 95% CI: 0.72–0.91, p = 0.0007). For workers with non-short sleep duration, compared to the reference group with short sleep duration, the risk of depression was reduced by 40% (OR = 0.60, 95% CI: 0.42–0.87, p = 0.0072). Regarding PA patterns, compared to the inactive group, the insufficiently active group did not show a significant difference in the risk of depression (OR = 0.83, 95% CI: 0.50–1.38, p = 0.4731), while the regularly active group showed a significantly reduced risk of 44% (OR = 0.56, 95% CI: 0.36–0.87, p = 0.0104).
The relationship between sleep duration, physical activity patterns, and depression among U.S. shift workers.
ORs, 95% CIs, and p-values are used to display the data. Model 1: unadjusted model. Model 2: adjusted for gender, race, age, income, marital status, and education level. Model 3: further adjusted for hypertension, cardiovascular disease, diabetes, hyperlipidemia, smoking status, alcohol consumption based on Model 2.
The relationship between sleep duration and prevalence of depression
The Generalized Additive Model (GAM) demonstrated a relationship between sleep duration and the prevalence of depression. As shown in Figure 3, the overall trend was significant (P overall = 0.003), and the nonlinear trend did not reach statistical significance (P nonlinear = 0.410). This indicates that as sleep duration increases, the risk of depression gradually decreases, and this relationship is linear.

GAM smooth curve fitting analysis evaluating the relationship between sleep duration and prevalence of depression. The red solid line represents the probability of depression, and the red shaded area indicates the 95% CI curve.
Discussion
This study examined the relationships between shift work, sleep duration, and PA patterns with depression. Results show that, after adjusting for demographics, lifestyle, and chronic disease history, shift workers had a significantly higher risk of depression than non-shift workers. This indicates that shift work is an independent risk factor for depression, consistent across different population groups.
Among shift workers, after adjusting for covariates, each additional hour of sleep reduced depression risk by 19%. Workers with sufficient sleep had a 40% lower risk of depression compared to those with insufficient sleep. The risk decreased linearly with longer sleep duration. Shift workers who engaged in regular PA had a 44% lower risk of depression compared to inactive workers.
Shift work, a globally common employment arrangement, has been increasing in recent years. Its negative health impacts extend beyond circadian rhythm disruption and poor sleep quality to include psychosocial factors and long-term health issues. 24 Systematic analyses show that shift workers, like nurses, doctors, and firefighters, have higher depression rates, mainly due to decreased melatonin secretion and stress from occupational activities and lifestyle habits. 25 Our findings align with a large cohort study showing a significant link between shift work and increased depression and anxiety risk, mediated by lifestyle factors like smoking and prolonged sedentary behavior. 26 Shift work also affects family dynamics and social relationships, potentially leading to social isolation and worsening mental health.18,27 Although some studies suggest female shift workers have a higher risk of depression than males,9,28 this gender difference was not seen in our study, possibly due to different assessment tools used.
Additionally, different studies may use various tools for assessing depression, affecting outcomes. For example, a study in Japan used the Center for Epidemiologic Studies Depression Scale for night shift nurses 29 ; New York police used the Beck Depression Inventory 30 ; and a prospective study used the Montgomery-Asberg Depression Rating Scale. 31 Each tool has unique characteristics and application scenarios, impacting results differently.
Identifying early depression tendencies in shift workers is crucial. Severe depressive symptoms can lead some workers to refuse participation, resulting in incomplete data and selection bias. 32 Mild depression often precedes more severe forms. Early detection and interventions, like telephone interviews and stress management training, can prevent worsening conditions and reduce the need for medication. Early interventions improve psychological well-being, lower healthcare costs, and boost productivity.33,34 This study used the PHQ-9 scale, where a score of five identifies early depression. 35 The PHQ-9, ranging from 0 to 27, is widely used in clinical settings and research. Its simple format is easy for patients to complete, facilitates standardized scoring, and is useful for comparative results and clinical applications.36,37
Multiple studies confirm that shift workers frequently suffer from short sleep duration and insomnia, mediating the relationship between shift work and depression.38–40 Shift work disrupts circadian rhythms, 41 leading to inadequate night sleep and poor daytime sleep, failing to restore fatigue and accelerating depression onset. Lack of sleep affects brain areas related to emotional regulation, increasing depression and anxiety risk. 38 Depression leads to insomnia, early waking, and poor sleep quality, worsening the cycle.42,43
Exercise is effective in mitigating depression symptoms. Research shows that moderate aerobic exercises, like walking, aquatic exercises, and dancing, improve sleep quality and duration among shift nurses, reducing depression and anxiety. 44 Systematic reviews 45 reveal exercise can be as effective as antidepressants and psychotherapy, especially in moderate to severe depression. However, shift work often limits PA opportunities, leading to weight gain and metabolic issues linked to depressive symptoms. 46 In this study, PA was divided into three categories: inactive, insufficiently active, and regularly active. The results from the multivariable logistic regression analysis indicate that insufficient PA does not significantly reduce depression risk, and low PA levels alone are inadequate. Consistent with previous research, high-intensity and frequent exercise are necessary to effectively reduce depression. 47
Currently, the 24-Hour Activity Cycle model emphasizes the importance of balancing sleep, PA, and sedentary behavior within a 24-h period. 48 This model provides a new perspective for understanding how these factors interact to influence health. Quality sleep can enhance the effectiveness of PA, while appropriate levels of PA can improve sleep quality, creating a positive feedback loop.49,50 The Adult 24-Hour Movement Guidelines recommend that adults engage in at least 150 min of moderate-intensity aerobic activity, such as brisk walking or cycling, each week, while ensuring they obtain at least 7 h of quality sleep each night. 51 These recommendations are particularly important for shift workers, who often face challenges related to insufficient sleep and lack of physical activity due to irregular work hours.52,53
With the proliferation of smart devices, researchers have increased their focus on the health of night shift workers, particularly regarding how objective assessments of sleep and PA can improve mental health. 54 For instance, wearable devices based on accelerometers effectively monitor the sleep duration and activity levels of night shift workers, providing data support for personalized health interventions.55,56 Therefore, future research could explore how to apply these technologies in practical interventions and assess the effectiveness of various measures to optimize health management strategies for shift workers, ultimately reducing the risk of depression and anxiety.
This research, based on large NHANES data, ensures the representativeness and generalizability of the results. It reveals the relationship between shift work, sleep duration, and PA patterns with depression, providing a basis for personalized interventions. The findings highlight the importance of early identification and intervention for depression. Recommendations include optimizing work schedules, providing exercise facilities, organizing group fitness activities, enhancing rest areas, and ensuring sufficient rest. Policymakers should focus on shift workers’ health, mandating regular health checks, and addressing health issues promptly. These measures can reduce depression, improve health, and boost productivity.
Despite adjusting for many confounding factors, residual confounding elements like genetics cannot be ruled out. We measured only baseline occupational and lifestyle information, not long-term job status changes like years of shift work. Some variables, such as PA patterns and sleep duration, relied on self-reported questionnaires, which may introduce biases. As a cross-sectional study, this research cannot establish causality. Additionally, the NHANES data from 2007 to 2010 may not fully reflect the social and health trends of 2024. Over time, shifts in work patterns and population health may occur, affecting the applicability of the study. Therefore, its conclusions need further validation in future prospective and objective studies.
Conclusions
This study shows that shift work is an independent risk factor for depression, while sufficient sleep duration and PA are protective factors against depression for shift workers. The findings underscore the importance of improving the working and living conditions of shift workers, such as optimizing work schedules, enhancing fitness facilities, improving sleep quality, and encouraging regular physical activity.
Footnotes
Acknowledgements
We extend our gratitude to all the volunteers who participated in the NHANES.
Ethical approval
This study utilized data from the National Health and Nutrition Examination Survey (NHANES), which was approved by the National Center for Health Statistics (NCHS) Ethics Review Board. Informed consent was obtained from all participants during the data collection phase.
Informed consent
Not applicable.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
