The impact of sleep, physical activity and sedentary behaviour on symptoms of depression and anxiety before and during the COVID-19 pandemic in a sample of South African participants

During lockdowns associated with the COVID-19 pandemic, individuals have experienced poor sleep quality and sleep regularity, changes in lifestyle behaviours, and heightened depression and anxiety. However, the inter-relationship and relative strength of those behaviours on mental health outcomes is still unknown. We collected data between 12 May and 15 June 2020 from 1048 South African adults (age: 32.76 ± 14.43 years; n = 767 female; n = 473 students) using an online questionnaire. Using structural equation modelling, we investigated how insomnia symptoms, sleep regularity, exercise intensity/frequency and sitting/screen-use (sedentary screen-use) interacted to predict depressive and anxiety-related symptoms before and during lockdown. We also controlled for the effects of sex and student status. Irrespective of lockdown, (a) more severe symptoms of insomnia and greater sedentary screen-use predicted greater symptoms of depression and anxiety and (b) the effects of sedentary screen-use on mental health outcomes were mediated by insomnia. The effects of physical activity on mental health outcomes, however, were only significant during lockdown. Low physical activity predicted greater insomnia symptom severity, which in turn predicted increased depressive and anxiety-related symptoms. Overall, relationships between the study variables and mental health outcomes were amplified during lockdown. The findings highlight the importance of maintaining physical activity and reducing sedentary screen-use to promote better sleep and mental health.

1. Greater insomnia severity symptoms and irregular sleep patterns will be directly associated with greater depressive and anxiety-related symptoms and this association will be stronger during lockdown than before lockdown. 2. Reduced physical activity and increased sedentary behaviour (including screen-use), will be directly associated with more depressive and anxiety-related symptoms and this association will be stronger during lockdown than before lockdown. 3. Reduced physical activity and increased sedentary behaviour (including screen-use), will be indirectly associated with more depressive and anxiety-related symptoms via their influence on sleep health and this association will be stronger during lockdown than before lockdown.

Results
Participant characteristics. Descriptive data on all study variables are presented as mean ± standard deviation (SD) or median with interquartile range (IQR) in Table 1 . To achieve these fit indices, we removed item 3 of the ISI from the model and allowed several items to covary (ISI items 1 and 2, ISI items 5 and 7, ISI items 2 and 4). Standardised factor loadings ranged between 0.404 and 0.983 (Supplementary Table S1). When fitting the model using the During Lockdown dataset, the measurement model achieved an acceptable fit (CFI = 0.965 and RM-SEA = 0.056[90%CI 0.049-0.063]), with standardised factor loadings ranging from 0.534 to 0.872 (Supplementary Table S1). Following the establishment of the measurement model, we estimated the relationships hypothesized between the observed and latent variables (see, Fig. 1 and Table 2). When tested on the Before Lockdown dataset, the structural model achieved acceptable fit (CFI = 0.950, RMSEA = 0.050 (90% CI 0.044-0.056). The model derived from the During Lockdown dataset had to be re-specified to account for the direct effect that student status has on (a) physical activity, sedentary screen-use, and sleep regularity, and (b) the covariation between item 2 on the ISI and sleep timing regularity. The final model fit the data relatively well (CFI = 0.950, RMSEA = 0.059 [90%CI 0.053-0.065]).
Results describing the contribution of the covariates suggest that, both before and during lockdown (a) students experienced greater symptoms of depression compared to non-students and (b) sex was not directly associated with depressive symptoms. When we re-specified the model built on the During Lockdown dataset to include the direct effects of student status on sleep and lifestyle variables, students reported poorer sleep regularity, greater sedentary screen-use and engaged in less physical activity compared to non-students.
The structural model confirmed that a direct relationship exists between insomnia severity and depressive symptoms both before and during lockdown. The direction of the coefficient indicates that more severe insomnia symptoms were associated with greater depressive symptoms and that this association was somewhat stronger during, rather than before, lockdown. The relationship between sleep regularity and depressive symptoms was non-significant both before and during lockdown.
Before lockdown, physical activity had no direct effect on sleep regularity, severity of insomnia symptoms, or depressive symptoms. During lockdown, however, less physical activity was directly associated with poorer sleep regularity, greater severity of insomnia, and greater depressive symptoms. Notably, during lockdown there was an indirect pathway from physical activity to depressive symptoms via insomnia severity.
Greater sedentary screen-use, both before and during lockdown, was associated with less sleep regularity, and greater severity of insomnia symptoms. The direct pathway between sedentary screen-use and depressive symptoms went from being non-significant before lockdown to significant during lockdown. Both before and during lockdown, an indirect pathway existed from sedentary screen-use to depressive symptoms via insomnia symptom severity. The directionality of the coefficients for the indirect pathway indicated that greater sedentary screen-use was associated with more severe insomnia symptoms and, therefore, more depressive symptoms. This association was stronger during lockdown than before lockdown.
Anxiety symptoms. When assessed using the Before Lockdown dataset, goodness-of-fit indices of the hypothesised measurement model were within acceptable range (CFI = 0.972, RMSEA = 0.040 [90%CI 0.034-0.045]). We achieved these fit indices by removing item 3 of the ISI from the model and allowing several items to covary (ISI items 1 and 2, ISI items 5 and 7, GAD-7 items 4 and 5). Standardised factor loadings ranged between 0.478 and 0.881 (Supplementary Table S2). When assessing the measurement model on the During Lockdown dataset, goodness-of-fit statistics indicated that the measurement model fitted the data well, with CFI = 0.967 and RMSEA = 0.049 (90%CI 0.044-0.054). Standardised factor loadings ranged between 0.531 and 0.902 (Supplementary Table S2).
Following the establishment of the measurement model, we estimated the structural relationships between the observed and latent variables (see Fig. 2 for a diagram of the structural results and Table 3 for regression paths results). When tested on the Before Lockdown dataset, the structural model achieved acceptable fit, with CFI = 0.951 and RMSEA = 0.048 (90%CI 0.043-0.052). When assessed using the During Lockdown dataset, we . Specifically, student status was no longer directly associated with symptoms of anxiety, but rather influenced both sedentary screen-use and physical activity instead.
Results describing the contribution of the covariates suggest that both before and during lockdown males experienced less severe symptoms of anxiety compared to females. Additionally, before lockdown students experienced greater anxiety severity compared to non-students. However, during lockdown, this effect was no longer present. When we re-specified the model derived from the During Lockdown dataset to include the direct effects of student status on lifestyle variables, students engaged in greater sedentary screen-use and less physical activity compared to non-students.
The structural model confirmed that a direct relationship exists between insomnia symptom severity and anxiety symptoms both before lockdown and during lockdown. The direction of the coefficient indicated that more severe insomnia symptoms were associated with greater anxiety symptoms and that this association was somewhat stronger during lockdown than before lockdown. The relationship between sleep regularity and anxiety symptoms was non-significant both before and during lockdown.
Furthermore, the results showed that before lockdown, physical activity had no direct effect on sleep regularity, or severity of insomnia symptoms. During lockdown, however, less physical activity was directly associated www.nature.com/scientificreports/ with less sleep regularity and more severe insomnia symptoms. With regards to the effects of physical exercise on symptoms of anxiety, no relationship existed before lockdown. In addition, a significant indirect effect existed between physical activity and symptoms of anxiety during lockdown, such that less physical activity was associated with more severe insomnia symptoms, and thereby, greater anxiety symptoms. Greater sedentary screen-use, both before and during lockdown, was significantly associated with poorer sleep regularity, increased severity of insomnia symptoms, and greater presence of anxiety symptoms. The associations between sedentary screen-use and sleep regularity was greater during lockdown than before lockdown. Moreover, both before and during lockdown there was an indirect pathway from sedentary screen-use to anxiety symptoms via insomnia symptom severity.

Discussion
We investigated the contribution of multiple lifestyle and sleep health factors on symptoms of depression and anxiety in a sample of South African participants before and during lockdown Alert Level 5, using structural equation modelling. Additionally, on each respective model we controlled for the effects of sex, student status and previous clinical diagnoses of depression and anxiety. We aimed to determine how combinations of lifestyle and sleep-related factors influenced mental health outcomes during the lockdown instigated in response to the global COVID-19 pandemic.
We found that, consistent with our prediction and the literature 37,38 , greater insomnia symptom severity was associated with greater depressive and anxiety-related symptoms, irrespective of whether participants were in lockdown or not. The relationship between insomnia symptom severity and mental health outcomes, however, was somewhat greater during lockdown than before lockdown, and with similar increases for both symptoms of depression and anxiety. Few studies have examined participants' sleep quality, duration or timing and its impact on mental health outcomes both before and during lockdown. Robillard et al. 39 found that participants who had reduced time in bed or went to bed later (in comparison to those with extended time-in-bed), during lockdown than before lockdown, reported higher levels of stress, depression and anxiety. Table 2. Results of structural equation models predicting depressive symptoms (N = 1048). Sleep regularity: higher numbers indicate greater irregularity. Screen-use sedentary screen-use, β standardized path coefficient, CI confidence interval, LL lower limit, UL upper limit. *p < 0.05. **p < 0.01. ***p < 0.001. a Indirect effect of physical activity and sedentary screen-use on depressive symptoms through sleep regularity or insomnia. b Total effects of physical activity and sedentary screen-use, including direct and indirect effects, on depressive symptoms. c The combined effect of all direct and indirect effects on depressive symptoms. www.nature.com/scientificreports/ In our sample, the relationship between insomnia symptom severity and mental health outcomes was the strongest amongst all the mental health and sleep/lifestyle associations. However, there was no association between sleep regularity and mental health outcomes at any time point. These results suggest that for symptoms of depression and anxiety (irrespective of the context), difficulties with initiating and maintaining sleep outweigh difficulties in maintaining a regular sleep schedule.
At odds with our prediction, modelling found no influence of time spent in moderate or vigorous physical activity on mental health outcomes before lockdown. This contrasts to previous literature and could be explained by the fact that individuals may make use of a variety of different tools to maintain a healthy mood and alleviate anxiety during ordinary life, such as socialising, entertainment and indoor and outdoor activities 40 . Amongst these, our data suggest that exercise is not a prominent coping tool under usual circumstances. However, during lockdown undertaking moderate or vigorous exercise was directly associated with a reduction in depressive symptoms, but not anxiety. Exercise may have a mood enhancing effect via its modulation of serotonergic and adrenergic activity in promoting brain-derived neurotrophic factor in the brain 41 . However, this exercise-related pharmacological action is not established in human or animal studies of anxiety.
Having high levels of sedentary behaviour, including screen-use, was associated with increased symptoms of depression and anxiety irrespective of the lockdown context. Similar associations have been found before www.nature.com/scientificreports/ lockdown, for example, in a study of Iranian children and adolescents investigating the relationship between screen time, physical activity and psychiatric distress 42 and during lockdown in diverse contexts 43,44 . Moreover, a study of adolescents in China during the current COVID-19 pandemic suggests that engaging in physical activity and reducing sitting time were important to reduce symptoms of insomnia, depression and anxiety 45 .
Most notably several indirect relationships became relevant in predicting the burden of depressive and anxiety-related symptoms during the lockdown period. For example, individuals who exercised moderately or vigorously were less likely to report symptoms of insomnia and this lack of insomnia symptoms was associated with fewer depressive and anxiety-related symptoms. This effect was not present before lockdown, where there were presumably (a) less financial, household and childcare demands on many individuals, (b) a wide availability of a variety of outlets for stress, and (c) absent psychological impacts of quarantine that would have been present during the period of lockdown 46 . Importantly, although the proportion of individuals who exercised did decrease during the lockdown period (from 68.2% to 61.0%), more than half of the sample continued to exercise at home.
A similar pattern of findings was evident for sedentary behaviour. During the lockdown period (although also before lockdown), individuals who spent more time sitting and using screens were more likely to have poor sleep quality and in turn more severe symptoms of depression and anxiety. In summary, these findings bolster the tenet that during times of restriction and social isolation it is critical to be active and concurrently minimise sitting time and screen-use to maintain healthy sleep, and in turn, psychological well-being.
Our analyses also controlled for the effects of sex and student status. We found that being female was associated with higher symptoms of anxiety, independent of lockdown, but not depression. This latter finding is in contrast to most of the literature [47][48][49] and may represent a unique resilient characteristic of females in our cohort. Other studies examining sex differences on the severity of depressive symptoms during lockdown generally follow the extant literature (females report higher levels of depressive symptoms than males). However, there are specific studies which report contrasting findings. For example, a recent longitudinal study compared, amongst a number of variables, depressive symptomatology at 3-weeks and 7-weeks into a lockdown period 50 . The authors found that at 3-weeks females had more severe depressive symptoms than males. However, at 7-weeks their symptoms had decreased somewhat. In contrast, their male counterparts had increased depressive symptoms at 7-weeks, with Table 3. Results of structural equation models predicting anxiety symptoms (N = 1048). Sleep regularity: higher numbers indicate greater irregularity. Screen-use sedentary screen-use, β standardized path coefficient, CI confidence interval, LL lower limit, UL upper limit. *p < 0.05, **p < 0.01. ***p < 0.0. a Indirect effect of physical activity and sedentary screen-use on anxiety symptoms through sleep regularity or insomnia. b Total effects of physical activity and sedentary screen-use, including direct and indirect effects, on anxiety symptoms. c The combined effect of all direct and indirect effects on anxiety symptoms. www.nature.com/scientificreports/ no between-sex difference in this mental health outcome at this timepoint. The authors concluded that females had greater long-term resilience to lockdown quarantine than males, although it is unclear to what extent this finding is generalizable from this cohort to other contexts, given the substantial variation in sex-specific changes in work and childcare arrangements globally. Regarding student status, before lockdown being a student was associated with greater depressive and anxietyrelated symptoms, consistent with prior literature 51 . This relationship remained during lockdown for depressive symptoms only. Most studies conducted during the pandemic have found that students, in contrast to nonstudents, experienced increased symptoms of both depression and anxiety 52 . Limitations and future directions. We note several important limitations. Firstly, our sampling method was not representative of the greater South African population and it likely underrepresents individuals living in urban low-income areas and rural districts.
Secondly, we note that our sample had a disproportionate number of female participants in comparison with male participants, which may have biased the results towards female participants in some analyses.
Thirdly, participants responses to questions asking about their experiences before lockdown may contain recall bias.
Fourthly, while our study described several relevant relationships between sleep/lifestyle variables and mental health outcomes, our findings are relatively general and cannot specify for whom these relationships are most salient. Future research should identify specific vulnerable and resilient individuals or groups by identifying how their sleep and lifestyle behaviours changed from ordinary life to the lockdown quarantine period.

Conclusion
Many studies report on lifestyle, sleep and mental health outcomes during the COVID-19 pandemic. However, relatively few investigations have reported on the strength, directionality and relationships of multiple factors and examined these both before and during national lockdown. Our findings showed that, from a variety of sleep and lifestyle behaviours, difficulties with initiating and maintaining sleep had the most influence on symptoms of depression and anxiety, and that this relationship was exacerbated during lockdown in comparison with ordinary life. Furthermore, irrespective of the lockdown context, spending significant daily periods sitting and engaging on screens is detrimental for mental health. On the other hand, engaging in moderate to vigorous physical activity became especially relevant during lockdown with benefits to mental health. Our study shows that, in times of restriction and upheaval characteristic of lockdown, individuals can rely on physical activity as a valuable tool in managing and maintaining healthy sleep to support mental health. In the current context, where individuals are juggling multiple economic, social, educational and vocational factors, understanding which strategies are effective in reducing symptoms of depression and anxiety is an important priority.

Methods
Study design and setting. The data presented in this analysis are from a larger observational study examining multiple lifestyle, routine and mental health outcomes reported before and during COVID-19 Alert Level 5 lockdown in a sample of South African adults 10 . In this paper we focus on predicting symptoms of depression and anxiety based on two key lifestyle behaviours (physical activity and sedentary behaviour including screenuse [termed sedentary screen-use]) and two aspects of sleep health (insomnia severity and sleep regularity). We compare the estimated relationships between all of these factors before (defined as the three months prior to lockdown, i.e. January, February and March 2020) and during lockdown (defined as the five weeks of Alert Level 5 lockdown, i.e. 27 March to 30 April 2020). During Alert Level 5 lockdown in South Africa individuals were only allowed to leave the home to access essential services such as groceries and medical attention. Leaving the home to exercise was not permitted and the sale of alcohol and cigarettes was prohibited. Participants completed the online survey during Alert Levels 3 and 4 between 12 May and 15 June 2020.
Participants and recruitment. We analysed data from 1048 South African adults (age: 32.76 ± 14.43 years; female: n = 767; male: n = 261; non-binary: n = 15; prefer not to say: n = 5). Of the sample, 473 were university students (age: 22.6 ± 6.39 years) and 575 were non-students (workers, retired individuals and volunteers; age: 41.1 ± 13.8 years). Volunteers completed an online survey in which they answered the same questions for two time points: before and during lockdown. The survey was distributed throughout South Africa using academic and social media networks together with snowball sampling techniques. We obtained ethical clearance from the Ethical Standards Committee at Rhodes University (2020-1459-3468) and the Department of Psychology's Ethics Committee at the University of Cape Town (PSY2020-014). All methods were performed in accordance with the relevant guidelines and all participants gave informed consent prior to initiating the survey.

Materials and instruments.
The full range of demographic, routine, sleep, lifestyle and mental health variables collected in this survey have been reported elsewhere 10 . Here we focus on the variables relevant to our current hypotheses.
The Insomnia Severity Index (ISI) 53 was used to characterise participants' perceptions of their insomnia symptoms. The ISI comprises seven items that assess participants' perceived difficulties with sleep initiation and maintenance, evaluation of their sleep quality (satisfaction and distress) and the daytime impact of their sleep difficulties. Scores range from 0 to 28 and the cut-off scores are specified as follows: 0-7 indicates no clinically significant insomnia; 8-14 shows subthreshold insomnia; 15 www.nature.com/scientificreports/ Participants reported their sleep regularity in terms of timing and sleep duration. Participants were asked to indicate the usual difference between their earliest and latest bedtimes and wake-up times (sleep timing regularity) and the usual difference between their longest and shortest sleep time (sleep duration regularity) in any given week before and during the lockdown period. Sleep timing regularity was calculated as the average self-reported bedtime and wake-up time regularity. Each question consisted of seven possible answers (< 1 h, 1 h, 1.5 h, 2 h, 2.5 h, 3 h, > 3 h variation in a given week), scored from 1 (< 1 h) to 7 (> 3 h), with higher scores indicating more irregularity.
Lifestyle factors included questions about exercise habits and screen-use duration (min/day). We used the International Physical Activity Questionnaire-short form (IPAQ) 54 to describe minutes per day spent doing moderate physical activity (MPA) and vigorous physical activity (VPA) as well as time spent sitting (min/day).
We used the Patient Health Questionnaire-2 (PHQ-2) 55 , which consists of two items of the PHQ-2 to assess primary symptoms of depression (feeling down, depressed or hopeless; having little interest or pleasure in doing). Summed scores range from 0 to 6, with higher scores indicating greater levels of depression. Scores of 3 or more are suggestive of a depressive disorder. We used the Generalized Anxiety Disorder 7-item (GAD-7) scale 56 to assess participants' symptoms of anxiety. This questionnaire is designed to screen for generalised anxiety disorder. Scores range from 0-28, with higher scores indicating greater levels of anxiety. Scores of ≥ 5 indicate mild symptoms, ≥ 10 show moderate symptoms, while scores ≥ 15 are suggestive of severe symptoms of anxiety.
Statistical analyses and structural equation modelling. All data analyses were completed using R statistical software and packages 57 . Direct comparisons of before-to-during lockdown variables including selfreported insomnia symptoms, sleep regularity, physical activity, sitting time, screen-use, depressive symptoms and anxiety-related symptoms have been reported before 10 . Those data also examined the contribution of sex (female versus male) and student status (non-student versus student) on sleep, lifestyle and mental health outcomes and found that before-to-during lockdown comparisons differed significantly by sex and student status. Hence, we controlled for sex and student status in our model testing analyses. Furthermore, we also controlled for the effects of previous diagnoses of depression and anxiety. Where these control variables did not alter the results, we excluded them from the final models.
We used a structural equation modelling (SEM) framework to estimate the hypothesised model using the "lavaan" package 58 . All continuous variables were scaled before being entered into the model. Four separate models explored depressive and anxiety-related symptoms before and during lockdown (Before Lockdown and During Lockdown datasets). SEM models were fitted using full information maximum likelihood estimation (FIML) to reduce bias due to missing data and maximum likelihood estimation with robust standard errors to ensure multivariate normality 59,60 .
First, we tested each of the four models to establish whether the latent variables are explained by the indicators using confirmatory factor analysis (CFA). The latent variables were insomnia severity (7 items of the ISI), sleep regularity (sleep timing regularity and sleep duration regularity), physical activity (time spent in moderate and vigorous exercise), sedentary screen-use (sitting time and total screen-use), depression (both items from the PHQ-2) and anxiety (7 items from the GAD-7). After establishing the measurement model, the structural relationships between the observed (e.g., sex and student status) and latent variables were estimated. Model fit was evaluated using the comparative fit index (CFI) and the root mean square error of approximation (RMSEA). An adequate fit is indicated by CFI > 0.95 and RMSEA ≤ 0.06 61 . If the hypothesised measurement model did not have a good fit, items whose factor loadings were ≤ 0.4 were dropped 62 . Furthermore, modification indices regarding correlated residual variances and covariances were included in the model if they fit theoretically 63