Data from 2019 was used as the reference year, representing a typical annual cycle and seasonal variation, for example, in terms of holidays, amount of light/daylength, and incidence of influenza-like illnesses. In order to ensure alignment by day of the week between 2019 and 2020, days were shifted before further computations were conducted. Due to the extra leap day in 2020, data was shifted by one day in Jan and Feb 2020 and by two days in Mar-Jul. Local timestamps for each country and time zone were also utilized, which included shifts that reflect daylight savings start (Mar-Apr in the Northern Hemisphere, Sep-Oct in the Southern Hemisphere) and end points (Apr in the Southern Hemisphere, Sep-Nov in the Northern Hemisphere). Paired differences between matching days in 2019 and 2020 for users who had valid data in both timepoints were then computed and included in subsequent analyses.
Each valid sleep period was defined as the longest sleep episode for each day, with time in bed between 4–12 hours. Three major variables were then extracted for each of these sleep periods: (1) Midsleep time was computed as the midpoint between bedtime and wake time, representing a proxy for circadian phase/chronotype 61 (2) Midsleep variability was computed using a rolling 7-day standard deviation of midsleep times, representing a proxy for sleep regularity, and (3) Resting heart rate which was computed as an average of 5-min heart rate measures during the sleep period. Average resting heart rates < 30 bpm and > 100bpm were removed as these were likely to represent physiologic or device anomalies. Due to an algorithm update in the spring of 2019 that affected computation of sleep duration by delaying bedtimes and advancing wake times, this could not be compared between years, however, absolute sleep duration in 2020 was included as an additional variable in time-varying models predicting resting heart rate.
Age and BMI information was self-reported by users upon app registration, and entered into models as potential covariates. This study was exempt from review by the National University of Singapore Institutional Review Board, as analysis involved the use of datasets stored without identifiers.
Computation of Stringency Index
Publicly available measures of restriction severity were extracted from the Oxford COVID-19 Government Response Tracker,42 focusing on 7 subscales believed to be most reflective of movement controls. These scales consisted of (1) school closures [0–3], (2) workplace closures [0–3], cancellation of public events [0–2], restrictions on public gatherings [0–4], closures of public transport [0–2], stay-at-home requirements [0–3] and restrictions on internal movements [0–2]. These 7 subscales were summed up into a single stringency index [range: 0–19] and a mean value was computed for every month from January to July for each country.
Quantification of Regional and Global Trends in Sleep and Resting Heart Rate
Changes in sleep and resting heart rate measures were derived for each month within each country separately, by first computing differences between equivalent days in Jan–Jul 2019 and 2020, and then averaging these differences by month. To estimate global (pooled) changes, separate random-effects meta-analyses by month were conducted for each predictor of interest – midsleep time, midsleep variability (standard deviation of the midsleep time over a 7-day rolling window) and resting heart rate. Meta-analyses were conducted using the R package ‘metafor’ 62. As there was evidence of high statistical heterogeneity between country estimates by month (Cochrane’s Q; P < .05, I2 > 75%), pooled estimates were weighted by the inverse variance of estimators for each country plus the estimated variance between countries.
Quantification of the Effect of Lockdown Stringency on Changes in Sleep and Resting Heart Rate
In order to quantify the effect of lockdown stringency on the heterogenous changes in sleep and resting heart rate patterns across countries, we ran multilevel growth curve models (MLMs) based on a sequential model-building approach. Multilevel models account for correlations between months within each country by allowing each country to have its own intercept. A null or baseline model is first constructed, and subsequent models consisting of the baseline model + additional explanatory variables were added sequentially to assess if the more complex model improved the overall model fit using a likelihood ratio test with degrees of freedom equal to the number of extra parameters. A significant likelihood ratio test indicates that the extra parameters improved the fit of the model to the data.
For each of the variables of interest (midsleep time, midsleep variability, resting heart rate), baseline MLMs (Model 1) were first estimated using country as a random intercept, month as a fixed effect, and a first-order autoregressive term. The latter was included to account for the nature of correlated time points in the repeated variable (month). Finally, in Model 2, we included the average lockdown stringency index by month as a time-varying factor to Model 1, in order to examine the overall effect of lockdown stringency on sleep and resting heart rate measures.
Quantification of the Effect of Changes to Sleep Patterns on Changes to Resting Heart Rate
To test our hypothesis that changes to sleep patterns (midsleep time and midsleep variability) would lead to associated changes in resting heart rate, we conducted further MLM analyses with changes in resting heart rate as the dependent variable and changes in midsleep time and changes in midsleep variability as explanatory variables. Sleep duration in 2020 was also included as an additional variable of interest in this model. A baseline MLM (Model 1) with a random intercept, month as fixed effect, and first-order autoregressive structure was first constructed. Age and BMI were entered as covariates, but were subsequently removed as they did not significantly improve the baseline model. Next, in Models 2–4, sleep duration in 2020, changes to midsleep time and changes to midsleep variability were added as time-varying predictors in separate models. Finally, in Model 5, all three sleep measures were entered in at the same time to assess the independent contributions of each predictor in the model.
All MLMs were estimated using the full information maximum likelihood method and performed using the nlme package in R (version 3.6.1). Marginal and conditional R2 values for mixed models are calculated based on 63. Notably, the marginal R2 only takes into account the variance of the fixed effects, while the conditional R2 takes both fixed and random effects into account.