The Whitehall II prospective cohort study was established in 1985–1988 among 10,308 British civil servants (33% women) aged 35–55 years at enrolment . Since inception, sociodemographic, behavioural and health-related factors have been assessed using questionnaires and clinical examinations approximately every four-five years. An accelerometer measure was added to the 2012–2013 wave of data collection for participants (age range: 60 to 83 years) seen at the London clinic and those living in the South-Eastern regions of England who underwent clinical examination at their home, constituting the population of the present study. At each wave, participants provided written informed consent and research ethics approvals were obtained from the University College London ethics committee (latest reference number 85/0938).
Physical behaviours, daylight, and sleep measurements
At the 2012–2013 clinical examination, participants were asked to wear a triaxial accelerometer (GENEActiv Original; Activinsights Ltd., Kimbolton, UK) on their non-dominant wrist for 9 consecutive, 24-hour, days. Over the period of the accelerometer wear, they also completed a daily sleep log answering the following questions: “What time did you first fall asleep last night?” and “What time did you wake up today (eyes open, ready to get up)?”. The device also included a light sensor that captures light in the visible range of wavelength (silicon photodiode sensor, 400–1100 nm wavelength range, 0–3000 lx range, 5-lx resolution) .
Accelerometer data sampled at 85.7 Hz, with acceleration expressed relative to gravity (1 g = 9.81 m/s2), were processed using GGIR R-package  (version 2.4–0). Euclidean Norm of raw accelerations Minus One, with negative values rounded to zero, were calculated  and averaged over 60-second epochs. Sleep episodes were identified using a validated algorithm guided by the sleep log . Data from the first waking up (day 2) to waking up on the day before the last day (day 8) were used. This resulted in 7 full days (waking-to-waking windows) of data per participant, corresponding to 7 waking (from wake up to start the day to sleep onset at night) and sleep (from sleep onset at night to the following wake up to start the day) windows. Participants were included for analyses if both wear times during waking window and the following sleep window corresponded to ≥2/3 of the respective windows . Non-wear period among valid days was corrected based on a previously reported algorithm .
Physical behaviours during waking window
Five physical behaviours variables were extracted for each waking window. Mean acceleration (in mg) was used as a marker of global activity level. Proportions of waking window spent in SB, LIPA, and MVPA were calculated as the time accumulated in average acceleration over a 60-s epoch < 0.04 g, ≥0.04 and < 0.1 g, and ≥ 0.1 g, respectively [36, 37], over the waking window divided by duration of the waking window. Timing of the five most active hours was used to represent physical activity chronotype. In analyses, we examined the association for a 10%-increase in the proportions of waking window in SB, LIPA, and MVPA, for 10 mg increase in mean acceleration and 3-hour increase in physical activity chronotype.
Daylight exposure during waking window
We used the intensity threshold of 1000 lx to differentiate indoor and outdoor light as in previous studies [14, 38]. For each waking window, two markers of daylight exposure were extracted: the proportion of waking window with light exposure > 1000 lx calculated as the accumulated time in 15-min epochs with peak value > 1000 lx over the waking window divided by the duration of waking window; the chronotype of daylight exposure corresponding to the period of the day when the person is most exposed to outdoor light, estimated as the 4-hour window (among 8-12 h, 12-16 h, and 16-20 h windows) with highest duration in light exposure > 1000 lx and in case of equal duration between two windows, the one with highest mean light exposure was selected. In analyses, we examined the association for a 10% increase in the proportion of waking window with light exposure > 1000 lx and for the 3 categories of light chronotype: Morning (8-12 h, reference), Afternoon (12-16 h), and Evening (16-20 h).
For each sleep window, the following sleep characteristics were considered: sleep onset (time when the person fell asleep to start the night, in minutes), duration of sleep window (time difference between sleep onset and next waking to start the day, in minutes), sleep duration (time slept during the sleep window, as defined by no change in arm angle greater than 5° for 5 minutes or more, in minutes), and sleep efficiency (here sleep duration divided by duration of the sleep window, in percent) .
Covariates were drawn from questionnaire and clinical examination during the 2012–2013 wave of data collection as well as from electronic health records (Hospital Episode Statistics (HES), cancer registry, and the Mental Health Services Data Set). Sociodemographic variables comprised age, sex, ethnicity (white, non-white), marital status (married/cohabiting, other), level of education (≤primary school, lower secondary school, higher secondary school, university, or higher degree; treated as ordinal variable), and professional activity status (active, inactive people). Wearing time periods included day type (week days, weekend) and season of wear (autumn/winter (from September equinox to March equinox) or spring/summer (from March equinox to September equinox)). Behavioural variables were smoking status (never smoker, ex-smoker, current smoker), alcohol consumption (none, 1–14 units/week, > 14 units/week), fruits and vegetables consumption (<daily, daily, >daily), and nap habits (no, yes). Health-related variables included body mass index (BMI; categorized as < 25, 25–29.9, and ≥ 30 kg/m2), self-reported medications known to impact sleep (corticosteroids, hypnotics, anxiolytics, antidepressants, antipsychotics), as referred thereafter as sleep medication for ease of reading, and number of chronic conditions among diabetes (fasting glucose ≥7.0 mmol/L, self-reported doctor-diagnosed diabetes, use of anti-diabetic medications, or record in HES), coronary heart disease, stroke, heart failure, cancer, arthritis, chronic obstructive pulmonary disease, depression, dementia, and Parkinson’s disease (assessed using HES records and data collected at Whitehall clinical exams as well as mental health records for depression and dementia).
For descriptive analysis, we averaged physical behaviours, daylight, and sleep variables over the days of the week to obtain weekly averaged daily estimates for each participant. We showed characteristics of the population according to median groups of average daily mean acceleration, average daily proportion of waking window with light exposure > 1000 lx, and average daily sleep duration. We also reported averaged physical behaviours and light variables by median groups of sleep characteristics.
Then, we used linear mixed models to assess day-to-day association of physical behaviours and daylight exposure with sleep characteristics. This method is suited for nested data with repeated measures among the same individuals, the random effects account for the within-person variability over the days (waking-to-waking windows) of the observational period. For each individual and each of its waking-to-waking windows (composed of the waking window and sleep window), the exposure is the physical behaviours/daylight variables during the waking window and the outcome the sleep variable during the sleep window, so that the exposure precedes the outcome, accounting for the temporality of the association. We examined the association between tertiles of physical behaviours and daylight exposure with sleep characteristics. In absence of evidence of non-linearity, we conducted further analyses using standardised values of physical behaviours and daylight exposure variables as continuous terms. We first examined the associations of physical behaviours and daylight variables with sleep outcomes in separate models, using three levels of adjustment. Model 1 was adjusted for sociodemographic factors, season of accelerometer wear, and day type, Model 2 was additionally adjusted for behavioural factors and Model 3 was also adjusted for health-related variables. For the association between daylight and sleep, we used an additional 4th model mutually adjusted for daylight exposure and chronotype. Finally, we examined the independence of associations of physical behaviours and daylight exposure with sleep by adjusting Model 3 for light exposure or mean acceleration, respectively.
We conducted three sensitivity analyses. One, we tested interactions with sex and season of accelerometer wear. When significant interactions were found, we repeated analyses separately in each group. Second, we repeated the analysis with mutual adjustment of physical behaviours and daylight exposure including also daylight chronotype. Three, we excluded participants using sleep medication and those with depression, as both these aspects are likely to strongly impact physical behaviours , daylight exposure , and sleep . Four, we restricted analyses to individuals with sleep problems but not using sleep medication, based on two definitions of sleep problems in absence of clinical diagnosis: Jenkins sleep problem score ≥ 12  and accelerometer-derived sleep efficiency< 80% . All analyses were undertaken using R software version 4.0.5 (http://www.r-project.org). Linear mixed-models were fitted using the function lme() from the lmerTest package version 3.1–3 . A two-sided P < 0.05 was considered statistically significant.