Introduction

Despite improvements in sanitation, vaccine development, and other public health measures, infectious diseases remain a leading cause of health loss globally [1, 2]. Approximately 10.2 million people died of infectious diseases in 2019, representing 18.4% of all deaths worldwide [3]. It is well established that lifestyle risk factors are associated with the progression of infectious diseases [4]. Therefore, it is of great necessity and high priority to explore modifiable risk factors for contracting infectious diseases and identify vulnerable groups [5].

Sleep behaviour is recognized as a key regulator of the immune response [6] and a potentially modifiable risk factor for infectious disease [7, 8]. Experimental evidence demonstrates that sleep loss can adversely affect the immune system and host resistance, potentially increasing the risk of infectious diseases [9]. Recent epidemiologic studies have also linked a variety of unhealthy sleep behaviours, including abnormal sleep duration [10,11,12], insomnia [13, 14], excessive daytime sleepiness [15], and evening chronotype [16], with an increased risk of infections. Notably, various sleep behaviours are typically clustered and intricately linked in a compensatory manner [17]. Therefore, a combination of multiple sleep behaviours may represent a comprehensive assessment of sleep patterns and elucidate additional clinically relevant information [18, 19]. However, the majority of previous studies assessed sleep behaviours individually without considering the complexity of the overall sleep pattern. Only a few studies have simultaneously assessed the independent effect of multiple sleep behaviours on infections, and the results have been inconsistent [20,21,22,23]. Emerging studies have generated healthy sleep scores to investigate the associations between healthy sleep patterns and noncommunicable diseases [17, 24]. Nonetheless, the associations between healthy sleep patterns and infectious diseases remain unclear. Moreover, the available evidence on the relationship between sleep behaviours and infections has been restricted to a few infection subtypes, particularly respiratory viral infections [25, 26]. However, whether these associations are universally applicable for additional infection subtypes has yet to be elucidated.

Therefore, we prospectively assessed the associations of combined healthy sleep patterns with the risk of hospitalization for infection and specific infection subtypes using data from a large community-based cohort of the UK Biobank. Furthermore, we conducted stratification analyses to examine whether the associations were consistent among different subgroups stratified by various potential confounders.

Materials and methods

Study design and participants

The UK Biobank is a large population-based prospective cohort study in which more than 500,000 participants aged 40–73 years were recruited from 22 assessment centers throughout the UK between 2006 and 2010 [27]. The detailed study protocol has been previously described elsewhere [28, 29]. Extensive data, including demographic data, lifestyle data (e.g., sleep behaviours), and medical information, were gathered from all participants through touchscreen questionnaires, interviews, and physical measurements [30]. All participants provided written informed consent. The UK Biobank study received ethical approval from the NHS National Research Ethics Service (16/NW/0274).

In the present study, we excluded participants who were subsequently lost to follow-up (n = 1297), those with HIV/AIDS (n = 481) and/or malignant neoplasm (n = 46,508) at any time, and those with incomplete data regarding sleep behaviours (n = 56,525). Participants with corresponding infection outcomes at baseline were excluded from each analysis. After these exclusions, a total of 397,523 participants were included in 1 or more of the final analyses. A flowchart depicting the selection of the study participants is presented in Supplementary Fig. 1.

Ascertainment of sleep behaviours

The information on sleep behaviours in the UK Biobank study was self-reported using a touchscreen questionnaire [17]. Sleep duration was measured by asking participants ‘About how many hours sleep do you get in every 24 h? (include naps)’. Chronotype was determined by the question ‘Do you consider yourself to be (i) definitely a morning person, (ii) more a morning than evening person, (iii) more an evening than morning person, or (iv) definitely an evening person’. Insomnia symptoms were recorded by asking ‘Do you have trouble falling asleep at night or do you wake up in the middle of the night?’, with responses of (i) never/rarely, (ii) sometimes, or (iii) usually. Subjecive daytime sleepiness was collected by asking ‘How likely are you to doze off or fall asleep during the daytime when you don’t mean to?’, with responses of (i) never/rarely, (ii) sometimes, (iii) often, or (iv) all of the time. Low-risk sleep factors were defined as adequate sleep duration (7–8 h/day), early chronotype (“morning” or “morning than evening”), no frequent insomnia symptoms (“never/rarely” or “sometimes”), and no excessive daytime sleepiness (“never/rarely” or “sometimes”). The details of the calculation of the sleep pattern score have been described previously [17, 24]. We created dichotomous variables for each sleep factor, which were assigned a score of 1 if they met the low-risk criterion or a score of 0 otherwise. The scores of all four sleep factors were summed to obtain a score for healthy sleep patterns. The healthy sleep score ranged from 0–4, with a higher score indicating a healthier sleep pattern.

Ascertainment of hospitalization for infections

The date and cause of hospitalization for infections were identified by linking to Hospital Episode Statistics (HES), which contains the International Classification of Disease edition 10 (ICD-10) diagnoses for inpatient admissions at National Health Service (NHS) hospitals in England. Hospitalization for any infection was identified by specific ICD-10 codes in the hospital inpatient records [1, 5]. Based on the infected organ, the diagnoses of hospitalization for any infection were subdivided into different subtypes, including central nervous system (CNS) infections, gastrointestinal (GI) infections, liver infections, respiratory infections, sepsis, skin infections, urogenital infections, and other infections. “Other infections” represent infectious diseases without a specific infected organ or too rare to constitute a separate subtype [31]. The diagnoses were also categorized into viral and bacterial infection subgroups based on the pathogen. The detailed ICD-10 codes for any infection and the specific infection subtypes are listed in Supplementary Table 1.

Covariates

Covariate information was obtained from the baseline questionnaires and included sociodemographic factors (age, sex, race, Townsend Deprivation Index (TDI), education), lifestyle habits (smoking status, drinking status, body mass index (BMI), physical activity), and medical history [hypertension, diabetes and cardiovascular disease (CVD)]. The TDI is an indicator of socioeconomic deprivation provided by the UK Biobank according to the residential postcode [32]. Smoking status and drinking status were self-reported and categorized as never, previous, or current. BMI was calculated by dividing a participant’s weight by the square of his or her height in meters (kg/m2). Participants were categorized into those who met and did not meet WHO guidelines on physical activity (150 min of moderate activity per week or 75 min of vigorous activity). Hypertension was ascertained by self-reports of physician diagnoses, antihypertensive medication use, systolic blood pressure ≥140 mmHg, or diastolic blood pressure ≥90 mmHg. The medical history of diabetes and CVD was obtained according to self-reported information about physician diagnosis information at baseline. Details of the covariates are provided in Supplementary Table 2 and are also available on the UK Biobank website (www.ukbiobank.ac.uk).

Statistical analyses

The baseline characteristics of 397,523 participants are summarized as the mean (SD) for continuous variables and as the number (%) for categorical variables according to the healthy sleep score (Table 1). The follow-up time was calculated from the recruitment date to the first incidence of hospital admission for infection, the date of death, or the end of the follow-up (31 October 2022). To minimize the potential for inferential bias, multiple imputations by chained equations (MICE) were used to address the missing covariate values [33, 34]. The percentages of missing variables are shown in Supplementary Table 3.

Table 1 Baseline characteristics according to healthy sleep score.

Cox proportional hazard regression models were applied to estimate the associations of individual sleep factors and healthy sleep scores with the risk of hospitalization for any infection and for specific infection subtypes. The results are reported as hazard ratios (HRs) with 95% confidence intervals (CIs). Proportional hazard assumptions were assessed by a combination of log-log plots and Schoenfeld residuals, and no violations were revealed. The basic model (Model 1) was adjusted for baseline age (continuous), sex (male or female), and race (white or other). The fully adjusted model (Model 2) was further adjusted for TDI (continuous), BMI (continuous), education (degree or no), physical activity (meets WHO guidelines or no), smoking status (never, previous, current), drinking status (never, previous, current), hypertension status (yes or no), CVD status (yes or no), and diabetes status (yes or no). For analyses of individual sleep factors, all four sleep factor data were simultaneously adjusted. In addition, we calculated the population attributable risk percent (PAR%) for individual and combined sleep factors to estimate the proportion of hospitalization for infection cases that theoretically would have been prevented if all participants adhered to low-risk sleep behaviours. The calculation of PAR% was performed using the “epi2by2” function of the “epiR” package. For analyses of overall sleep patterns, we tested the linear trend by treating healthy sleep scores as continuous variables to estimate HRs per 1 score increment and P for trend.

Subsequently, we performed stratified analyses according to age (≥65 or <65 years), sex (male or female), race (white or other), BMI (≥30 kg/m2, <30 kg/m2), physical activity (meets WHO recommends or no), smoking status (current or no), drinking status (current or no), hypertension status (yes or no), diabetes status (yes or no) and CVD status (yes or no). We assessed the potential interaction between healthy sleep scores and stratified factors using the likelihood ratio test by comparing the fully adjusted models with and without a cross-product term. We performed several sensitivity analyses to examine the robustness of our study. First, we excluded participants who experienced hospitalization for infection events within the first 2 years of follow-up to reduce potential reverse causation. Second, we restricted the analyses to participants with no missing covariate data. Moreover, the average 24-hour level of noise pollution was further adjusted as possible confounders based on the main model. Considering the potential influence of psychological factors, we further adjusted for the depression and anxiety at baseline.

All the statistical analyses were performed using R software (version 4.3.1). A two-sided P value < 0.05 was considered to indicate statistical significance. We adopted conservative Bonferroni correction using a threshold of P < 4.55 × 10−4 (0.05/110) to determine a significant interaction effect in the multiple testing of the stratified analysis.

Results

Baseline characteristics

Table 1 describes the baseline characteristics of the included participants (n = 397,523) according to the healthy sleep score. Overall, participants had a mean (SD) age of 56.3 (8.1) years, and 54.9% were female. Participants with higher healthy sleep scores were more likely to be younger, white, less materially deprived, more educated, more physically active, never smokers, and have a lower BMI. They also tended to have a lower prevalence of hypertension, diabetes, and CVD at baseline.

Associations of individual sleep factors with the risk of hospitalization for infection

During a median of 13.5 (interquartile range: 12.4–14.2) years of follow-up, we documented 60,377 cases of hospitalization for any infection. When four low-risk sleep factors were considered separately, adequate sleep duration (HR = 0.89; 95% CI, 0.87–0.90), early chronotype (HR = 0.96, 95% CI, 0.94–0.97), no frequent insomnia (HR = 0.90; 95% CI, 0.88–0.91), and no excessive daytime sleepiness (HR = 0.83; 95% CI, 0.80–0.87) were each independently associated with a lower risk of hospitalization for any infection in the fully adjusted model (Table 2). The proportion of hospitalization for any infection due to individual unhealthy sleep behaviours ranged from 0.79–8.00%, among which sleep duration (PAR% = 8.00%; 95% CI, 7.48–8.51%) and insomnia (PAR% = 6.40%; 95% CI, 5.93–6.86%) were the predominant factors. The combined PAR% of any infection for all four sleep factor combinations was 12.09% (95% CI, 11.09–13.08%), suggesting that more than 10% of hospitalizations for any infection would have been prevented if all participants adhered to the four low-risk sleep behaviours.

Table 2 Relationships between individual sleep factors and risk of hospitalization for infection.

Similar protective effects of individual sleep factors were observed in the analyses of specific infection subtypes, although with a few exceptions (all P < 0.05). Specifically, there were no significant associations between adequate sleep duration and CNS infection; early sleep duration with CNS infection, GI infection or liver infection; or no association between excessive daytime sleepiness and liver infection (all P > 0.05). Four low-risk sleep factors were simultaneously associated with decreased risks of hospitalization for viral (HR = 0.85; 95% CI, 0.83–0.88; PAR% = 15.78%) and bacterial infections (HR = 0.89; 95% CI, 0.87–0.91; PAR% = 12.18%). The risk of hospitalization for infection attributable to all four sleep factors varied by specific infection subtype, ranging from 13.41% (95% CI, 10.95%–15.80%) for sepsis to 26.36% (95% CI, 15.27–35.99%) for liver infection.

Associations of healthy sleep patterns with the risk of hospitalization for infection

When these four sleep factors were combined, the risk of hospitalization for any infection and specific infection subtypes gradually attenuated with increasing healthy sleep score in a dose-dependent manner (all P values for trend < 0.001; Table 3). Fig. 1 and Supplementary Fig. 2 present the cumulative risk of hospitalization for any infection and specific infection subtypes stratified by healthy sleep score during follow-up, respectively. These inverse associations and dose–response relationships remained statistically significant after adjustment for a series of potential confounders. Compared with participants with the unhealthiest sleep score of 0, participants with a healthy sleep score of 1 (HR = 0.78; 95% CI, 0.70–0.87), 2 (HR = 0.71; 95% CI, 0.64–0.78), 3 (HR = 0.62; 95% CI, 0.56–0.69), or 4 (HR = 0.59; 95% CI, 0.53–0.65) had increasingly lower risks of hospitalization for any infection in the fully adjusted model. A one-point increment in the healthy sleep score was associated with a 9% lower risk of hospitalization for any infection (HR = 0.91; 95% CI, 0.90–0.92). For specific infection subtypes, the associations between a one-point increment in the healthy sleep score and hospitalization for infection ranged from a 9% lower risk for sepsis (HR = 0.91; 95% CI, 0.89–0.93) to a 20% lower risk for liver infection (HR = 0.80; 95% CI, 0.74–0.87). Healthy sleep scores were associated with decreased risks of hospitalization for both viral (HR for per 1 score = 0.89; 95% CI, 0.88–0.90) and bacterial infections (HR for per 1 score = 0.91; 95% CI, 0.90–0.92).

Table 3 Risk of hospitalization for infection according to the healthy sleep score.
Fig. 1
Fig. 1
Full size image

Cumulative risk of hospitalization for any infection stratified by healthy sleep score.

Subgroup and sensitivity analyses

Consistent inverse associations were observed in analyses stratified by age, sex, race, BMI, physical activity, smoking status, drinking status, hypertension status, diabetes status and CVD status (Figs. 23 and Supplementary Fig. 313). Stronger inverse associations of healthy sleep scores with the risk of hospitalization for any infection, respiratory infection, or bacterial infection were observed among younger participants (<65 years of age) than older participants (≥65 years of age). The inverse associations of healthy sleep scores with the risk of hospitalization for any infection, respiratory infection, or urogenital infection were stronger in females than in males. The interactions remained statistically significant after the Bonferroni correction (P for interaction < 0.00045). Sensitivity analyses showed no substantial change when using nonimputed data (Supplementary Table 4), excluding participants who developed events within the first two years of follow-up (Supplementary Table 5), or average 24-hour level of noise pollution (Supplementary Table 6). The results for sensitivity analyses also remained consistent with our main analysis after further adjusting for depression (Supplementary Table 7) or anxiety (Supplementary Table 8) at baseline.

Fig. 2: Association between healthy sleep score and the risk of hospitalization for infections stratified by age.
Fig. 2: Association between healthy sleep score and the risk of hospitalization for infections stratified by age.
Full size image

A Association between healthy sleep score and the risk of hospitalization for any infection stratified by age. B Association between healthy sleep score and the risk of hospitalization for respiratory infection stratified by age. C Association between healthy sleep score and the risk of hospitalization for bacterial infection stratified by age. The model was adjusted for sex, TDI, race, BMI, education, physical activity, smoking status, drinking status, hypertension, diabetes, and cardiovascular disease.

Fig. 3: Association between healthy sleep score and the risk of hospitalization for infections stratified by sex.
Fig. 3: Association between healthy sleep score and the risk of hospitalization for infections stratified by sex.
Full size image

A Association between healthy sleep score and the risk of hospitalization for any infection stratified by sex. B Association between healthy sleep score and the risk of hospitalization for respiratory infection stratified by sex. C Association between healthy sleep score and the risk of hospitalization for urogenital infection stratified by sex. The model was adjusted for age, TDI, race, BMI, education, physical activity, smoking status, drinking status, hypertension, diabetes, and cardiovascular disease.

Discussion

In this large community-based cohort study, our analyses demonstrated that higher healthy sleep scores were significantly associated with lower risk of hospitalization for any infection and for specific infection subtype in a dose-dependent manner. More than 10% of hospitalizations for infections could have been prevented if all participants adhered to the overall healthy sleep pattern. Moreover, the observed protective association was stronger among individuals <60 years of age and females.

Consistent with the findings of previous epidemiological studies, our study revealed associations between individual sleep factors, including abnormal sleep duration [35, 36], late chronotype [16, 37], insomnia [13, 38], and excessive daytime sleepiness [23], and the risk of hospitalization for infection. Given the intricate interconnection of various sleep behaviours, evaluating sleep patterns incorporating multiple sleep behaviours via an integral approach is essential [39]. However, existing prospective studies on the relationship of multiple sleep behaviours with infections have been restricted to respiratory viral infections. For instance, two recent cohort studies simultaneously evaluated the independent effects of multiple sleep factors on the risk of hospitalization for COVID-19, but the results were inconsistent [23, 40]. A cohort study revealed that abnormal sleep duration, insomnia, and excessive daytime sleepiness were associated with an increased risk of COVID-19 hospitalization [40], whereas another cohort study reported significant associations between only excessive daytime sleepiness and COVID-19 hospitalization [23]. The inconsistency observed in these findings can be attributed to inadequate consideration of the combined effect of multiple sleep behaviours. Regarding other subtypes of infection, previous studies have reported that infected patients are more likely to have sleep disorders, including CNS [41], GI [42], skin [42], liver infection [43], sepsis [44], etc. However, these studies have only evaluated the sleep quality of infected patients based on a cross-sectional design, making it difficult to clarify whether the sleep disorders preceded the development of infection or were consequences of it.

Instead of considering individual sleep behaviours in isolation, our study comprehensively examined the combined effects of multiple sleep factors on the risk of hospitalization for infection via healthy sleep scores. Our prospective study consolidated the existing evidence and revealed that healthy sleep patterns yield similar but different magnitudes of protective effects on most subtypes of infections, including respiratory infections, sepsis, skin infections, urogenital infections, and “other infections”. Intriguingly, the associations of some individual sleep factors with the risk of hospitalization for CNS, GI, or liver infection were not significant while the associations of overall healthy sleep patterns with these infection outcomes were significant. It may be attributed to the relatively small sample size of outcome cases, which led to attenuated statistical power. Moreover, we also found that healthy sleep patterns were associated with a decreased risk of hospitalization for either viral or bacterial infections. While most previous studies have focused on viral infections, our findings highlight the protective effects of healthy sleep patterns on bacterial infections as well, offering new insights into the broader impact of sleep on infection risk.

Considering the association between healthy sleep patterns and infections may be influenced by demographic factors, other lifestyle factors, and health status, we conducted multiple subgroup analyses to explore the potential heterogeneity. Similar protective effects of healthy sleep patterns were observed across different subgroups stratified according to age, sex, race, BMI, physical activity, smoking status, drinking status, hypertension status, diabetes status and CVD status. These findings suggest that the beneficial impact of overall healthy sleep patterns on infection risk is robust and generalizable across diverse populations. Notably, we found that the protective effects of adhering to healthy sleep patterns on the risk of hospitalization for any infection were more remarkable in those <65 years of age and females. These age and sex differences could be explained by discrepancies in host susceptibility, lifestyle characteristics (e.g., smoking, drinking), exposure risk, health-seeking behaviour, sex steroid hormones and immune response [45, 46]. Moreover, despite the significant interactions, protective dose‒response associations between higher healthy sleep scores and the risk of hospitalization for infection were observed across the age and sex subgroups. Our findings highlighted the additive effects of multiple sleep factors on the risk of infection and appealed for adherence to overall healthy sleep patterns across entire population.

The mechanisms through which combined sleep behaviours affect the risk of infectious disease have not been fully elucidated. However, these sleep behaviours may affect the risk of infectious disease through different but complementary pathways. Existing evidence has demonstrated that sleep is considered a prominent modulator of the immune response and is critical to host resistance to infection [6, 9]. For instance, reduced sleep duration and insomnia symptoms may be associated with alterations in cellular immunity (e.g., natural killer cell activity, T-cell proliferative response) and increased expression of inflammatory cytokines (e.g., CRP, IL-6, TNFα, and IL-1β) [47,48,49]. The late chronotype was related to circadian misalignment, persistent hypothalamic–pituitary–adrenal (HPA) axis activation, and increased concentrations of B and T cells [16, 26, 50]. Excessive daytime sleepiness is commonly defined as a sign of insufficient sleep and circadian misalignment, which may result in oxidative stress and systemic inflammation, dysmetabolism, and immune derangements [40, 51]. However, further research is needed to determine how combined sleep behaviours operate synergistically and affect the risk of infectious disease.

Strengths and limitations

Our study has several major strengths. First, the large sample size and prospective design assured a large number of outcome events and adequate statistical power. Second, extensive data collection allowed us to adjust for a wide range of potential confounders and enabled a comprehensive definition of hospitalization for infections through linkages to hospital episode data. More importantly, we extended the existing studies and constructed healthy sleep scores to comprehensively assess the prospective association of overall healthy sleep patterns with the risk of hospitalization for any infection and various infection subtypes.

However, several potential limitations of the current study should be considered. First, the observational study design made it difficult to interpret the association as causal. Despite full adjustment for various confounders, residual confounding by other unmeasured or unknown factors remained possible. Second, sleep behaviours were self-reported, which may lead to recall bias and misclassifications compared to objective measures. Third, we dichotomized four sleep factors to create a healthy sleep score for simplicity, which might have resulted in a loss of information and study power. Moreover, the healthy sleep score did not include all sleep behaviours, such as obstructive sleep apnea and daytime napping, which could additionally increase the risk of infection [23, 52]. Fourth, sleep behaviour data were collected only once at baseline, making it difficult to assess long-term patterns. Future studies should include repeated sleep measurements to explore the long-term effects of healthy sleep patterns on infection outcomes. Fifth, to ensure the adequacy of the sample, we used both primary and secondary ICD-10 codes to identify diagnoses of infection, making it challenging to distinguish whether the infection was a cause of hospitalization or was acquired during hospitalization. In addition, our definition of infection was restricted to hospitalization, which might be insensitive to mild cases of infection. Finally, UK biobank participants are relatively healthier than the general population [53], potentially leading to an underestimation of the associations between healthy sleep patterns and infection outcomes. Additionally, most participants were of European descent, which might affect the generalizability of our findings to other populations.

Conclusion

Our study extended the existing knowledge and indicated that adhering to a healthy sleep pattern was prospectively associated with a decreased risk of hospitalization for infection, especially for individuals <65 years of age and females. Our findings highlight the potential of sleep behaviour interventions for the primary prevention of infectious diseases.