How and when EEG reflects changes in neuronal connectivity due to time awake

Summary Being awake means forming new memories, primarily by strengthening neuronal synapses. The increase in synaptic strength results in increasing neuronal synchronicity, which should result in higher amplitude electroencephalography (EEG) oscillations. This is observed for slow waves during sleep but has not been found for wake oscillations. We hypothesized that this was due to a limitation of spectral power analysis, which does not distinguish between changes in amplitudes from changes in number of occurrences of oscillations. By using cycle-by-cycle analysis instead, we found that theta and alpha oscillation amplitudes increase as much as 30% following 24 h of extended wake. These increases were interrupted during the wake maintenance zone (WMZ), a window just before bedtime when it is difficult to fall asleep. We found that pupil diameter increased during this window, suggesting the ascending arousal system is responsible. In conclusion, wake oscillation amplitudes reflect increased synaptic strength, except during the WMZ.


INTRODUCTION
Good sleep is essential for daily functioning and overall quality of life. The reason we need sleep is so that physiological systems used during the day have a dedicated period to rest and conduct structural maintenance, 1 clear metabolic by-products, 2,3 restore overall functioning to baseline levels, 4,5 and more. This means that we accumulate sleep need with time awake and can only restore balance following sleep, a process referred to as sleep homeostasis. Also important is the timing of sleep, controlled by a 24 h circadian rhythm which allows independent systems across the body and brain to synchronize their recovery to the external world's day/night cycle and thus optimize overall performance. 6,7 These homeostatic and circadian fluctuations make up the two-process model of sleep. 8 The homeostatic process of the two-process model in particular was designed to explain the notable changes in sleep slow waves, electroencephalographic (EEG) oscillations between 0.5 and 4 Hz that characterize NREM sleep (non rapid-eye-movement sleep, i.e. stages 2 & 3). 9 Slow wave activity decreases exponentially during NREM sleep, reflecting homeostatic sleep pressure dissipation. Vice versa, slow wave activity at the beginning of sleep depends on the duration of prior wake, following an increasing saturating exponential function. 10,11 This means that the buildup in sleep need is steepest during the initial hours of wake, then gradually saturates with additional time awake ( Figure 1A).
A possible explanation for this increase in slow wave activity with prior wake is that wakefulness progressively increases neuronal synaptic strength when forming new memories, which then requires sleep to restore overall synaptic balance. This is referred to as synaptic homeostasis, as described by the synaptic homeostasis hypothesis. 12 In essence, learning and acquiring memories requires changes to the brain in the form of strengthened synaptic connections between utilized neurons. Increased synaptic strength increases overall connectivity, which leads to increased synchronicity across the brain. This increased synchronicity between neurons will result in more synchronized oscillations in the surface EEG, detected as oscillations with larger amplitudes and steeper slopes as time awake increases. The hypothesis then predicts that sleep, when inputs cease and new memories are no longer acquired, is the only time when synaptic balance can be re-normalized to baseline levels. 12,13 Using computational models, 14 animal sleep data, 15 and human sleep data, 16   The two-process model during a 4/24 extended wake schedule. The red line reflects the homeostatic process, building sleep pressure monotonically with wake and dissipating during sleep. The blue line reflects the circadian process, peaking in the middle of the day and at its lowest in the middle of the night, independent of actual sleep and wake behavior. The shaded area reflects the resulting sleep pressure from combining these two processes. Black filled blocks indicate when participants actually slept, whereas the outline indicates the window in which they would have slept according to their circadian rhythm. (B) Experiment schedule. Each block indicates an EEG recording session. Filled blocks indicate data analyzed in this paper. Color indicates the activity participants engaged in: gray, watching TV; red, the resting state recordings in C; teal, task blocks analyzed in Snipes et al. 70 ; purple, the MWT; black, sleep. The height of each block indicates the condition in which data were collected: short, lying in bed; medium, seated in a comfortable armchair with foot and backrest/standing; tall, seated at a desk. Brief empty spaces indicate transition periods allowing for delays. Six longer breaks were included prior to each TV block in which participants were provided with meals. Circadian time was normalized across participants to their habitual bedtime. Participants at baseline and during the recovery night were free to wake up when they wished, and at the beginning of the extended wake period they were woken up after 4 h of sleep. (C) Timeline for the resting state recordings. Each condition was 6 min, and always done in the depicted order. Between the Oddball and Standing, a questionnaire was conducted which took a variable amount of time, followed by moving the participant from the armchair to standing. Abbreviations: BL, baseline; MWT, maintenance of wakefulness task.

OPEN ACCESS
Therefore, while increasing synaptic strength would have predicted an increase in both theta and alpha power with time spent awake, in practice neither oscillation strictly reflects this buildup in homeostatic pressure, and they are further synchronized to different circadian phases. However, the fact that wake oscillations do not reflect sleep homeostasis may be due to a limitation of spectral power analyses. ''Power'' refers to the amount of energy in a frequency band, and is typically calculated using some variant of the Fast Fourier Transform. 30 Once a time-series signal has been transformed into the frequency domain, power values are averaged or summed within a frequency range of interest, and this is the power for that band. While this is a simple and generally effective measure for quantifying oscillatory activity, it is simultaneously affected by the quantity of oscillations present in the signal and their amplitude, as well as broadband changes in the entire spectrum. 31 The synaptic homeostasis hypothesis predicts that an increase in synaptic connectivity results in an increase in oscillatory amplitudes; this does not need to have any bearing on the number of oscillations that actually occur. It is therefore possible that non-homeostatic factors such as the WMZ could independently affect the quantity of oscillations, whereas time spent awake more specifically affects their amplitude. When both oscillation amplitudes and quantities change independently across wake recordings, the resulting power values will reflect some undifferentiated mix between the two. By separating these contributions, we may have a specific marker of homeostatic sleep pressure during wake. Not only would this provide supporting evidence for the hypothesis that sleep homeostasis is linked to synaptic plasticity, but also provide a marker for sleep pressure more easily acquired than slow wave activity during sleep.
We therefore wished to determine whether the circadian and homeostatic influences on theta and alpha oscillations could be dissociated in resting wake EEG by separately measuring changes in amplitude and changes in quantities of oscillations. Eighteen young healthy adults participated in a 4/24 extended wake paradigm ( Figure 1A), in which they slept the first 4 h of the night and were then kept awake for 24 h with repeated resting state recordings ( Figure 1B), while measuring high-density EEG. We conducted cycle-by-cycle analysis to identify bursts of oscillations in the theta and alpha range, a method which identifies oscillations based on the morphology of the EEG signal rather than relying on power and amplitude thresholds (for an in-depth explanation, see STAR Methods: method details: EEG burst detection). 32 We then looked at changes in the mean amplitude of bursts and the average number of cycles (i.e., oscillations present in a burst) per minute for each band. Our prediction was that both theta and alpha amplitudes would follow an increasing saturating exponential across extended wake and show decreases following sleep. At the same time, the decrease in alpha power with time awake should be explained by a decrease in the overall number of alpha oscillations. Likewise, circadian changes such as the decrease in theta during the WMZ should be reflected in decreases in the number of bursts.
To independently monitor changes in alertness across the extended wake period, we also recorded pupillometry with infrared cameras. Pupil diameter and pupil responses to salient stimuli have been linked to ll OPEN ACCESS iScience 26, 107138, July 21, 2023 3 iScience Article alertness-promoting activity in the locus coeruleus (LC), [33][34][35] as well as other interconnected nuclei in the brainstem and forebrain that make up the ascending arousal system (AAS). 36,37 While there are still many open questions about the link between pupil size and sleep/wake promoting nuclei, the relationship between any of these signals and EEG could help better explore the underlying mechanisms driving the changes in oscillatory activity across extended wake. In short, while the two-process model and the synaptic homeostasis hypothesis provide specific predictions about wake EEG amplitudes, with pupillometry we hoped to provide possible explanations for changes in oscillatory occurrences.

RESULTS
We recorded EEG, pupillometry, and questionnaire data from participants performing 3 wake resting state recordings for 6 min each ( Figure 1C). The first was a standard condition, Fixation, in which participants were seated in a comfortable armchair and had to gaze at a fixation point $3 m away. The second was an active auditory Oddball, in which tones were presented randomly and participants had to push a button after ''oddball'' (i.e. deviant) tones. Afterward, participants filled out a questionnaire and then got up for the final recording of Standing with eyes closed. They were asked to stand for this condition because during sleep deprivation participants quickly fall asleep with eyes closed. These rest recordings were conducted 12 times: before and after each of the 3 nights of sleep, and 6 more times throughout the extended wake period approximately 3 h apart, for a total of 8 recordings across extended wake ( Figure 1B). The primary focus of this study was the Fixation condition, used in previous studies. The auditory Oddball was included as an exploratory condition to evaluate changes in pupillometry with time awake, especially responses to target tones which are thought to reflect activity in the LC. 35 The EEG of both the Oddball and the Standing with eyes-closed conditions were investigated in order to establish the sensitivity to homeostatic effects of other conditions.
For every outcome measure, we conducted paired t-tests on the overnight changes of the baseline night (BL pre vs. BL post), the extended wake changes (S1 vs. S8) and the changes during the WMZ (S5/S8 vs. S6/S7), the timing of which could be independently determined through changes in subjective sleepiness ( Figure 2). All t-values, degrees of freedom, p values, and Hedge's g effect sizes are provided together in Table 1. Throughout the text, only the corresponding t-values will be reported, unless either effect sizes or p values are specifically of interest (e.g. when trending).

Figure 2. Subjective sleepiness
Sleepiness was measured on a continuous visual-analog adaptation of the KSS, using the original labels as markers (y axis). The thick black line indicates the group average, and thin colored lines are datapoints of individual participants. Solid lines connect sessions during the same-day extended wake period, and dashed lines indicate changes across sleep. S1-S8 are spaced out relative to the time they occurred within the 24 h wake period ( Figure 1B)

Alpha burst cycles/min Fixation
Given the discrepancy with previous results that found decreases in alpha with sleep deprivation, 18,19 we inspected the spectrograms of z-scored power to determine whether some other factor was contributing to the increase in alpha in our data ( Figure S1). We found broadband increases in power with time awake, as A B Figure 3. Power band changes, z-scored (A and B) (A) Theta power (4-8 Hz) and (B) alpha power (8)(9)(10)(11)(12). Thick lines indicate group averages for each condition (as different colors) across sessions (x axis). Solid lines connect sessions during the same-day extended wake period, and dashed lines indicate changes across sleep. S1-S8 are spaced out relative to the time they occurred within the 24 h wake period ( Figure 1B). Dots reflect individual participants' datapoints. The shaded gray area indicates the WMZ. Power spectral density values were first z-scored for each frequency pooling channels, sessions, and conditions. All channels were included in the average except edge channels: 48 iScience Article well as increases in theta and beta power extending into the alpha range. Furthermore, unlike previous experiments, our 4/24 design is such that S1 and S8 were during the lowest circadian points for alpha power. Therefore, the broadband and neighboring band effects may have had a stronger influence on final alpha power compared to previous studies, thus explaining the discrepancy.
Oscillation amplitudes increase with extended wake independently from quantities, but decrease during the WMZ Cycle-by-cycle analysis was used to identify bursts between 2 and 14 Hz (a schematic of the algorithm is provided in figure in STAR Methods). Figure 4 provides an example of the EEG and burst detection during S8. The detected bursts were then split into theta (mean frequency between 4 and 8 Hz), and alpha (8 and 12 Hz). Oscillation amplitudes were quantified as the average negative-to-positive peak voltage for all the cycles involved in a burst. The ''number'' of oscillations was quantified as the number of cycles per minute.   Figure S3A). EEG data traces are in gray. Thick colored lines indicate the ''reference'' burst, the longest among temporally overlapping bursts in the same channel. Thin colored lines indicate overlapping bursts across channels considered to be the ''same'' burst as the reference. These were associated with the reference because mean frequencies were within 1 Hz of each other. Different colors represent different frequency bands.  iScience Article S8: Standing 11% [-2, 22]), and alpha increased from S1 to S2, then decreased from S5 to S6. Against our expectations, however, both theta and alpha showed a robust decrease in amplitude during the WMZ for both Fixation (theta t (16) = À3.19; alpha t (16) = À3.71) and Oddball (theta t (16) = À4.78; alpha t (16) = À6.47).
Changes across baseline sleep in cycles per minute went in the opposite direction from amplitudes: theta quantities on average increased although this was not significant (Fixation t (17)  Theta and alpha cycles per minute were significantly affected by the WMZ in opposite directions during the Standing (theta t (16) = À5.02; alpha t (16) = 2.51) and Oddball conditions (theta t (16) = À4.03; alpha t (16) = 2.91) but trending in Fixation (theta t (16) = À1.77, p = 0.095; alpha t (16) = 1.98, p = 0.065), such that theta quantities decreased relative to the overall trajectory, and alpha increased (or did not decrease along the expected trajectory).
To determine whether oscillation amplitudes and quantities originated from the same areas, we inspected the mean distribution of amplitudes and cycles per minute for theta and alpha bursts across the 123 channels, pooling sessions ( Figures 6A and 6B). To determine whether the changes observed in Figure 5 were spatially dependent, we performed paired t-tests between S1 and S8 for each channel, with false-discovery rate (FDR) correction ( Figures 6C and 6D).
For all three conditions, theta bursts were located primarily in frontal-midline channels, which also generated the largest amplitudes ( Figure 6A). The increases observed with extended wake were widespread although somewhat patchy for both amplitudes and cycles per minute ( Figure 6C) and were not limited to the main frontal-midline sources of theta. Alpha amplitudes and cycles per minute were instead spatially dissociated ( Figure 6B), with high amplitudes originating more occipitally, and high quantities originating more centro-parietally. While the increase in alpha amplitudes in the Fixation and Oddball were similarly widespread as in theta, during the Standing condition the increase was only frontal ( Figure 6D, top row). Instead, the decrease in alpha quantities was localized to the centro-parietal regions in Fixation and Oddball, with more widespread decreases in Standing ( Figure 6D, bottom row).

Pupil diameter means and standard deviations change during the WMZ, while pupil responses to oddball tones do not
To explore further what drives the different trajectories observed in the EEG data across wake, and in particular the changes in the WMZ, we analyzed pupillometry data from the Fixation and Oddball conditions. In both, mean pupil diameter after an initial decrease remained largely constant during the extended wake period ( Figure 7A), with a specific increase during the two WMZ timepoints (Fixation t (15) = 4.65; Oddball t (12) = 2.17, p = 0.051). There was also a significant drop in pupil diameter from S1 to S8 during Fixation (t (16) = À3.78, p = 0.002) but not Oddball (t (12) = À1.39, p = 0.189). Interestingly, the two baseline recordings done in the evening an hour before bedtime (BL Pre, Pre) showed larger diameters during Oddball than during Fixation (BL Pre: t (12) = 2.18, p = 0.050, g = 0.62; Pre: t (16) = 3.22, p = 0.005, g = 0.63), but not during the same recording of extended wake (S7 t (14) = À0.77, p = 0.453, g = À0. 16). This indicates an interaction, at least within the WMZ, between recording condition, pupil diameter, and prior sleep restriction.
Standard deviations of pupil diameter were also assessed ( Figure 7B). Across sleep, there was a large significant decrease in standard deviations for both conditions (Fixation t (13)  iScience Article a significant increase in standard deviations from S1 to S8 (Fixation t (16) = 3.52; Oddball t (12) = 4.74), although S8 Oddball values returned to those of S3-S5 after the WMZ, whereas S8 Fixation remained lower.
Finally, we investigated the pupil response to target tones during the auditory Oddball condition (Figures 7C and S2). Unfortunately, there was substantial data loss due to increased eye closure with extended wake ( Figure 8B) combined with equipment malfunctions during measurements, so power for this analysis is reduced. Pupil response to oddball tones was quantified as the area under the curve between the pupil response to targets relative to standard tones, from 0.5 to 2 s after tone onset. There was no change in response to targets from evening to morning around a baseline night of sleep (t (9) = 0.26), nor was there a significant change from beginning to end of the extended wake period, although there was on average a decrease in pupil oddball response (t (11) = À1.58). There was trending effect of the WMZ (t (9) = 2.08, p = 0.067). However, as can be seen from Figure 7C, this was almost entirely due to a drop in the oddball response for S8 relative to previous sessions (e.g. S5 vs. S8: t (10) = 2.77, p = 0.020, g = À1.07). Furthermore, there was never a return to baseline values of pupil oddball response following recovery sleep (pre vs. post: t (13) = 2.43, p = 0.030, g = À0.62), complicating any potential interpretation.
Ocular microsleeps are sensitive to the WMZ, blink rates are not In addition to actual pupil diameters, the same eye-tracking cameras were sensitive to ocular behavior such as blinking and microsleeps, both of which increase with sleepiness 38,39 and can potentially affect measures of pupillometry. We therefore wished to determine whether the changes in pupillometry could be iScience Article explained by ocular behavior, based on whether they followed similar trajectories across time. We measured all eye closures and split them into blinks when less than 1 s, 40,41 and as ocular microsleeps when longer than 1 s 42 We specify ''ocular'' to distinguish from microsleeps properly classified with the EEG, 42 and we label them as ''microsleeps'' rather than merely eye closures because prolonged eye closures during sleep deprivation are predictive of behavioral lapses in auditory tasks. 43 Blink rates ( Figure 8A) gradually increased across wake in the Oddball (t (13) = 4.37) but not Fixation condition (t (16) = 0.62), and there was no change during the WMZ (Fixation t (15) = À1.25; Oddball t (15) = À0.21). Therefore, blinking could not explain changes in pupillometry. At the same time, the amount of ocular microsleeps was extremely sensitive to the WMZ (Fixation t (15) = À4.85; Oddball t (15) = À6.28), returning almost entirely to baseline levels. However, across extended wake, ocular microsleeps otherwise increased linearly, starting from near zero and reaching 10-15% of the recordings by S8 (Fixation t (16) = 4.81; Oddball t (13) = 4.18). Like with blinking, this trajectory was not reflected in the various measures of pupillometry, and therefore cannot explain the results.

DISCUSSION
The two-process model of sleep has been the backbone of sleep research for the past 40 years, and has withstood the test of time. 44 Not only is sleep homeostasis uncontroversial, it is now used to prove whether a given organism sleeps at all. 45,46 The synaptic homeostasis hypothesis has been more contentious, especially in the details of the underlying mechanisms behind synaptic ''strengthening,'' 47-49 however, the general idea is compelling: that synaptic changes during the day requires sleep to restore synaptic balance. Both of these models were based primarily on observations during sleep, and while they made testable predictions of what should occur during wake, measurements of EEG power did not conform to expectations. The two-process model of sleep postulated that sleep need accumulates along an increasing saturating exponential function with time awake (Figure 1A), and the synaptic homeostasis hypothesis proposed that this process is driven by increasing synaptic strength, which results in increased neuronal synchrony. 8,12 By separately analyzing oscillation amplitudes and quantities, we were able to validate these predictions.
Our results reveal that indeed both theta and alpha amplitudes follow an increasing saturating exponential trajectory across extended wake, following the predicted trajectory of sleep homeostasis (Figures 5A and 5B vs. Figure 1A). Furthermore, both theta and alpha amplitudes returned to baseline levels following recovery sleep, with trending decreases for theta and highly significant decreases for alpha around baseline sleep. These results, therefore match the predictions of the two-process model and the synaptic iScience Article homeostasis hypothesis. It is still possible that synaptic strength does not drive this increase in amplitudes, but at the very least, changes in wake oscillation amplitudes correspond to the changes observed in slow wave activity. 8,10,11 In particular, the fact that the number of alpha oscillations decreased at the same time as amplitudes increased, and the former was widespread and the latter was localized ( Figure 6D), clearly indicates a dissociation between these homeostatic changes in amplitude from whatever process causes oscillations to occur in the first place. More subtly, while both theta amplitudes and quantities increased during extended wake, the trajectories were different, suggesting again distinct mechanisms. In both cases, spectral power was insufficient to capture these trends with time, as it cannot differentiate between simultaneous and comparably large changes in amplitudes and quantities.
These results invite re-analysis of many previous findings showing differences in power between conditions and populations. Efforts are already underway to distinguish the effects of periodic and aperiodic components of the EEG spectrum. 31 Therefore, in cases in which the effect is largely periodic, further investigation should determine whether it is the amplitude or quantities of oscillations that change; this can then provide more interpretable results. In the context of understanding synaptic plasticity for example, it would be beneficial to re-analyze data from the studies of Hung et al. 50 and Bernardi et al. 51 These two landmark studies found that theta power in resting state EEG increased locally depending on prior daytime activity. Re-analysis of these datasets may reveal whether this effect was specific to oscillation amplitudes, even in the alpha band, which would further support the interpretation that such local effects are driven by spatial differences in synaptic strengthening.

Sensitivity of different conditions to sleep homeostasis
Beyond demonstrating whether the standard eyes-open resting EEG would be sensitive to sleep and synaptic homeostasis, we were interested in establishing whether this generalized to other conditions. We iScience Article indeed found that the EEG of the Oddball followed the same trajectories as Fixation, but the Standing condition did not. Theta Standing amplitudes did not increase past S3 during the extended wake period, and alpha Standing amplitudes neither decreased following sleep, nor did they increase during extended wake past S2. Given the overall larger amplitudes in this condition, this may be at least partially due to a ceiling effect. At the same time, given the eyes-closed condition, it is also possible that participants were closer to ''true sleep'' during S8 Standing. This is supported by the complete change in spectrogram in the Standing Back channels ( Figure S1). Altogether, our results indicate that oscillation amplitudes tend to reflect sleep homeostasis; however, this is not the only factor contributing to these amplitudes. In practice, this means that different recording conditions will be more or less sensitive to changes in sleep homeostasis.
Cortical desynchronization during the WMZ What did not match our predictions at all were oscillatory amplitudes during the WMZ. In both Fixation and Oddball, theta and alpha oscillation amplitudes decreased during the WMZ, and then returned to their previous trajectories during S8. The effect sizes of the WMZ were actually larger for amplitudes compared to the number of oscillations ( Table 1). The fact that oscillation amplitudes decreased implies that whatever mechanism drives the WMZ, it results in overall desynchronized cortical activity. Supporting this finding of cortical desynchrony, Ly et al. found that transcranial-magnetic stimulation (TMS) evoked potentials, reflecting cortical excitability, had lower amplitudes during the WMZ compared to earlier in the day. 52 Except for such circadian changes, TMS evoked potentials across the day reflect sleep homeostasis, increasing with time awake and decreasing following sleep. 53 However, more generally, increased cortical synchronization reflects decreasing levels of consciousness, with deeper sleep stages and comatose states producing the largest evoked potentials. [54][55][56] Therefore it is possible that the WMZ may even reflect a qualitatively distinct state of alertness.
In practice, this means that oscillation amplitudes can usually be used as a marker for homeostatic sleep pressure, except during the hours before habitual sleep. We do not consider this dip in amplitudes during the WMZ (and the difference in Standing oscillation amplitudes described previously) to indicate that the twoprocess model and synaptic homeostasis hypothesis are inaccurate, just that the amplitudes of oscillations are no longer accurately reflecting the wake-related changes in neuronal connectivity and sleep homeostasis.

Timing and duration of the WMZ
It is noteworthy how the WMZ briefly interrupts both the linear increase in theta quantities and the saturating exponentials of theta and alpha amplitudes. This highlights how the WMZ is limited in time, unlike the gradual circadian component of the two-process model ( Figure 1A). The model was established based on measures of alertness, core body temperature, and melatonin concentration, all of which changed approximately sinusoidally across 24 h. 21 While none of our outcome measures were paralleling these sinusoidal fluctuations, almost all of them were clearly affected by the brief WMZ. We therefore suspect that a specific pathway is responsible for the WMZ, distinct from melatonin concentration and core body temperature, although still synchronized to the suprachiasmatic nucleus (SCN), the brain's timekeeper. 57 The timing of the WMZ in our study diverges slightly from some previous studies which find the WMZ to occur 3-6 h before bedtime, 23,27,29 but is in agreement with others that find the WMZ 1-4 h before bedtime. 24,25 Studies like ours with later WMZ times were conducted under normal office lighting conditions ($150 lux, or no manipulation reported), whereas studies with earlier WMZ times were recorded under dim lighting conditions (< 10 lux). As demonstrated by Gooley et al., 58 brighter daytime light shifts melatonin onset to around 2 h later, likely explaining the difference in results. This therefore means that whatever light-induced mechanism delays melatonin onset, it also delays the WMZ onset.

Neural pathways of the WMZ
Given that both the mean and standard deviation of pupil diameters were also strongly affected by the WMZ (Figure 7), it is likely that the AAS is involved. The AAS includes the LC, the ventral tegmental area and substantia nigra, the dorsal and median raphe nuclei, and the basal forebrain. 36 All these areas have been linked to changes in pupil diameter, 36,37,59 and have widespread connections to the rest of the cortex. The LC in particular has been linked to transitory pupil responses such as the increases observed during oddball tasks. [33][34][35] Since we do not find an increase in pupil responses to oddball target tones in the WMZ ( Figure 7C), this may suggest that of all the AAS, the LC is actually not involved in the WMZ. iScience Article Alternatively, this may merely indicate that pupil oddball responses are not a reliable indicator of LC activity across time. Unfortunately, due to reduced power, these results are suggestive at best, and furthermore the link between LC and pupil diameters has not been unambiguously established. Hopefully future studies will be able to determine which nuclei are involved in the WMZ.

The role of the WMZ in humans
The WMZ has, to our knowledge, only been investigated in humans. It is possible the WMZ may even be human-specific, but this can be difficult to validate because it bears a close resemblance to crepuscular behavior observed in some animal species, especially rodents. 60,61 Crepuscular rhythms manifest as increases in activity at dawn and dusk, usually accompanied by corresponding increases in core body temperature. 62,63 By contrast, the WMZ in humans occurs in the absence of either increases in activity 64,65 or core body temperature, 25 suggesting differences in underlying physiological pathways, as well as different functions.
The fact that the WMZ primarily affects sleepiness and sleep latencies suggests that the main function of the WMZ is to resist sleep rather than promote activity. This may be a human-specific adaptation because we have long consolidated wake and sleep, unlike most other species who have more fragmented and polyphasic sleep. 66,67 By ensuring that individuals do not initiate sleep too early, the WMZ largely guarantees that the subsequent 8 h of sleep are completed within the correct circadian window, thus maintaining continued synchronization with the overall circadian rhythm and environmental light-dark cycles. During normal wake, the WMZ may not be apparent or even necessary, however, when homeostatic sleep pressure is unusually high (for example from insufficient sleep the night before), such a mechanism would be critical to maintain wakefulness until the onset of the correct sleep window.
In polyphasic-sleep species such as mice and rats, the timing of sleep onset for any given sleep episode is less critical. An alternative hypothesis is that the WMZ is a vestige of primate nest-building, which also occurs in the evening. However, such an activity takes around 7 min 68 so this does not explain why the WMZ would last several hours.
The WMZ needs to be investigated more. As speculated by Strogatz et al., 22 such a mechanism may be behind sleep disorders such as insomnia; if the WMZ never ''shuts off,'' this will result in substantially delayed sleep onset; if it is not present at all, this could result in circadian desynchrony. Taking this one step further, control over the WMZ could improve general wellbeing; being able to selectively shut it off could help with jetlag. Alternatively, activating the WMZ during night shifts could improve performance in critical industries, such as emergency medicine or airline pilots. Our 4/24 extended wake paradigm, measuring both EEG and pupillometry, consists of a comparatively easier and equally effective approach to investigating the WMZ relative to the standard > 40 h sleep deprivation, and may therefore be better suited for large-scale studies also involving patients.

Limitations of the study
While we are satisfied with many of the design choices for this experiment, there is room for improvement. Given the unexpected importance of the WMZ, we would have benefitted from a traditional circadian marker such as melatonin concentration, which would have allowed more precise synchronization across participants to circadian phase. Additionally, more frequent recordings (e.g. every hour) would have provided a better temporal resolution to delineate the start and end of the WMZ for each participant.
Regarding the wake recordings, given that the Oddball condition produced the largest effect sizes, its possible more controlled tasks will provide better results than Fixation. Regarding the analyses, we implemented a relatively basic cycle-by-cycle burst detection algorithm, and there is ample room for improvement following more systematic development of this approach.
Regarding the interpretation of the EEG results, it is important that they are replicated with datasets using much longer bouts of sleep deprivation, spanning more than 24 h and with more than a single recording after the WMZ; it is possible that slower circadian changes are still present in oscillation amplitudes, which cannot be disentangled within a single period. Likewise, data exists using the forced desynchrony protocol 18 which can properly dissociate circadian from homeostatic changes, as well as a constant routine protocol to control for homeostatic pressure. 69  iScience Article results, it is important that they are replicated with larger sample sizes, and possibly comparing circadian changes with and without sleep restriction, as our results suggest an unexpected interaction.

Conclusions
In summary, we found that wake EEG oscillations reflect the increase in neuronal connectivity that builds up with time awake, through increased amplitudes, which change independently across time from oscillation quantities. We demonstrated that both theta and alpha amplitudes follow the same increasing saturating trajectories of sleep homeostasis previously identified with slow waves during sleep. However, the WMZ proved to be such a potent contributor to wakefulness as to temporarily counteract these effects, impacting both the amplitudes and number of occurrences of oscillations. In addition to the EEG, we have identified mean pupil diameter as specifically sensitive to this window. This specificity strongly suggests that the WMZ is caused by a wakefulness driver distinct from the gradual sinusoidal 24 h circadian fluctuations in alertness. Finally, we speculate that the AAS may be crucially involved, and that the WMZ may be a human-specific mechanism to resist sleep under unusually elevated levels of homeostatic sleep pressure.

STAR+METHODS
Detailed methods are provided in the online version of this paper and include the following:

ACKNOWLEDGMENTS
This study was conducted as part of the SleepLoop Flagship project of Hochschulmedizin Zü rich, with additional funding from the Swiss National Science Foundation (320030_179443) and Hirnstiftung. Marc Bä chinger provided the eye-tracking equipment, technical assistance, and advice on the oddball protocol. Professor Christian Baumann and Niklas Schneider provided the EEG equipment. Simone Accascina helped with task programming and provided technical support during data collection. Noa Rieger aided with data collection. Lastly, a special thank you to all of our participants for taking part in this study.

Lead contact
Further information and requests for data should be directed to and will be fulfilled by the lead contact, Sophia Snipes (snipes.sophia@gmail.com).

Materials availability
There are no newly generated materials to report.
Data and code availability d The raw data reported in this study cannot be deposited in a public repository because it is too large. To request a copy, contact Sophia Snipes (snipes.sophia@gmail.com) or Reto Huber (reto.huber@kispi.uzh. ch). Summary values used for the statistics in Table 1, as well as detected bursts, preprocessed EEG of the Fixation condition, and pupillometry have been deposited at Mendeley Data and are publicly available as of the date of publication. The DOI is listed in the key resources table.
d All original code has been deposited at Zenodo and is publicly available as of the date of publication. DOIs are listed in the key resources table.
d Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.

EXPERIMENTAL MODEL AND STUDY PARTICIPANT DETAILS
18 participants completed the experiment. University student applicants were screened for good health, good sleep quality, and at least some sleep deprivation vulnerability. 19 participants were recruited, and one participant dropped out midway. Of the 18 participants who completed the experiment, 9 were female and 3 were left-handed, all of European ancestry. Between-sex comparisons were not considered due to the small sample size and consequent low power. Participants were required to be between the ages of 18 and 26 in order to reduce interindividual age-effects of sleep homeostasis; consequently, mean age (G standard deviation) was 23 G 1 years old. This limits generalizability, but the outcomes for specific populations can be anticipated from homeostatic changes in slow wave activity. All participants self-reported no hearing impairments. Data collection and interaction with participants was conducted according to Swiss law (Ordinance on Human Research with the Exception of Clinical Trials) and the principles of the Declaration of Helsinki, with Zurich cantonal ethics approval BASEC-Nr. 2019-01193. Participants signed informed consent before the study.

Experiment design
Participants conducted a 4/24 extended wake paradigm, depicted in Figure 1. This involved habituation to a regular sleep-wake schedule prior to the experiment (minimum 4 nights), with bedtimes and wakeup times selected to match the participant's preferred window and daily schedule. During the experiment, participants went to bed at their habitual bedtime, and were woken up 4 hours later. They were then kept awake for 24 h, followed by a recovery night. In addition to the extended wake bout, participants conducted a baseline night in which they slept during their habitual sleep window. The baseline was conducted before the extended wake bout in all but four participants.
The experiment schedule is in Figure 1B. Resting wake EEG recordings were measured before and after each night of sleep, and an additional 6 times during the 24 h wake period, for a total of 12 recordings. Prior to each recording S2-S7, participants were seated in the same position, watching 2 TV episodes around 40 minutes each, from a series of their choice. After each rest recording, participants were free to move around, and were provided with a home-cooked meal which they had selected from a list of vegetarian options (each meal during each break was the same). 6 of these breaks were included, each around 40 minutes (adjusting for delays in the schedule).
During the rest recordings, participants were seated in a comfortable armchair with a footrest (IKEA strandmon) in a well-lit room ($150 lux at eye level) and had to maintain fixation on a 20 cm red cross placed $3 m from their head, $30 cm below eye-level. The timing of the three rest recording conditions is depicted in Figure 1C. Each session began with a Fixation period, in which their only instructions were to maintain fixation on the cross and stay awake. This was immediately followed by an active auditory Oddball. As the focus was on pupillometry for this task, the stimuli were tones rather than visual inputs in order to avoid any spurious changes in light. Two types of tone were presented: standards (160 tones), and targets (40 tones). Participants had to press a button whenever a target tone occurred, while maintaining fixation and staying awake. Each tone lasted 60 ms, and for each participant the tone was either 660 Hz or 440 Hz for the targets, and vice versa for the standard tones. The interstimulus interval ranged randomly from 1.8 to 2.4 s, with a minimum of 3 standard tones between targets. After the Oddball, participants were provided a questionnaire to fill out, including the Karolinska Sleepiness Scale (KSS, Figure 2). 71 Finally, participants stood up from the chair and moved to lean against the wall and had a Standing period with eyes closed. The purpose of this condition was to have a long recording with eyes-closed, the most typical condition for alpha activity, 72 without participants falling asleep. Caldwell et al. 73 previously found that there was no effect on alpha activity when comparing seated to standing recordings across sleep deprivation during eyes closed.
Participants maintained a regular sleep-wake schedule the week prior to each experiment bout, and the timing of the experimental nights was adapted to each individual's preferred circadian time. Therefore the 24 h circadian rhythm could be inferred from previous studies. 21,25,74 Changes synchronized to melatonin would be high during night recordings (S1, S2, S8), and low during day recordings. Vice versa, circadian changes synchronized to core body temperature would peak in the middle of the day (S4, S5), and be low in the middle of the night (S1, S8). Because the focus was on homeostatic changes, these comparisons were not statistically analyzed, but can be inferred from the outcome measures' trajectories.

EEG preprocessing & power analysis
EEG data was recorded at 1000 Hz, with 129 electrodes including the Cz reference, using EGI HydroCel Geodesic Sensor nets. Four electrodes were external to the net, and were positioned on the mastoids and under the chin for sleep scoring (sleep architecture is available in Snipes et al. 70  iScience Article (126, 127) were located on the cheeks and excluded, leaving 123 channels for EEG data analysis after rereferencing to the average. Preprocessing and data analyses were done using EEGLAB 75 and custom MATLAB scripts. Data was downsampled to 250 Hz and filtered between 0.5-40 Hz. Major artifacts were identified visually, and physiological artifacts (eye movements, heartbeat, muscle activity) were removed with independent component analysis (ICA). The process is depicted in detail in Snipes et al. 70 Supplementary Figure 5-1.
Power was calculated as power spectral density using Welch's method with 8 s windows, Hanning tapered, 75% overlap. Power values for each participant and each frequency were z-scored pooling across sessions, conditions, and channels. Z-scored values were then averaged across all channels excluding the outeredge electrodes (Figure 3). When plotting spectrograms, a 1 Hz lowess filter was used to smooth the signal ( Figure S1).

EEG burst detection
There were two main reasons for analyzing EEG oscillations as bursts using cycle-by-cycle analysis. First, when visually inspecting the EEG during extended wake, the most prominent features are in fact bursts rather than single isolated events, as can be seen in the example of Figure 4. Second, any method trying to investigate independent changes in oscillation amplitude and quantity must ensure that the detection method does not rely on either. Previous studies investigating plasticitydependent effects and local sleep in wake identified waves based on either fixed or relative voltage thresholds. 50,51,[76][77][78] The problem with fixed thresholds when trying to answer our research question is that when oscillations increase in amplitude without changing in quantity, they will still appear to increase in quantity since more waves are now above-threshold. The additional problem with relative thresholds, such as taking the top N% of all waves recorded for a given participant, is that it constrains the number of detected oscillations independently of how prevalent they are in the signal. Therefore, if a given participant has no oscillations, this method will identify false positives from the 1/f aperiodic background activity. Vice-versa, if a participant has a recording completely dominated by oscillations (such as with eyes-closed), this method will miss most of them. The problem of dependency between quantity and amplitude, as well as the problem of both over-and underestimating oscillations, persists for all oscillation-detection methods that require amplitude cutoffs, including wavelets and Hilbert. 30 Cycle-by-cycle analysis avoids this by relying entirely on the shape and regularity of the signal; the tradeoff is that it is not suited to detecting single isolated waves such as local sleep events. 79 For our analysis, burst detection was conducted with custom MATLAB scripts adapted from Cole and Voytek's Python bycycle package. 32 The pipeline described below is also provided schematically in below figure. First, clean EEG data was filtered into narrow overlapping bands (2-6, 4-8, 6-10, 8-12, 10-14 Hz) using a minimum order high-pass then low-pass equiripple FIR filter (stopband frequency = passfrequency G 1 Hz, passband ripple 0.04 dB, stopband attenuation 40 dB). Zero-crossings were identified in the narrow-band filtered data. Then between descending zero-crossings and rising zerocrossings, negative peaks were identified as the minimum value in the ''unfiltered'' data (minimally filtered during pre-processing between 0.5 and 40 Hz). Positive peaks were also identified as the maximum values in the unfiltered data between rising and descending zero-crossings, and these were used as the start and end of each cycle around the negative peak. iScience Article Once all the peaks were identified, 4 consecutive cycles had to meet the following properties in order to qualify as an oscillation burst: A) the cycle's negative peak had to correspond to a local minimum; B) the mean distance to the neighboring peaks had to be within the range of the period of the filter (e.g. between 0.1 -0.17 s when filtering between 6-10 Hz); C) the minimum ratio between the distance in time of the current peak to its neighbors had to be above 0.6 (i.e. similar consecutive periods); D) the rise amplitude, measured as the voltage difference between the prior positive peak to current negative peak, and decay amplitude of the cycle had to have a ratio of at least 0.5 (i.e. one flank was not less than half the amplitude of the other); E) the minimum ratio between the cycle amplitude (negative peak to positive peak voltage, averaging both neighboring positive peaks) and neighboring cycles had to be more than 0.6 (i.e. similar consecutive amplitudes); F) the proportion of timepoints decreasing in amplitude between previous positive peak and current negative peak, and timepoints increasing in amplitude between current peak and following positive peak, had to be above 0.6 (i.e. how much time during the cycle the signal went in the wrong direction); and G) the proportion of the voltage increasing from positive to negative peak, and decreasing from negative to positive peak, had to be above 0.6 (i.e. how much amplitude went in the wrong direction). The criteria B, E, and F are from Cole and Voytek, whereas A, C, D, and G are our additional optimizations. The parameters and burst-detection criteria were chosen through trial-and-error on an independent subset of data recorded during this experiment (the Game and PVT conditions of the SD task block reported in Snipes et al. 70 ). The procedure involved iteratively adjusting thresholds and introducing cycle exclusion criteria until the theta and alpha burst detection was largely consistent with visual inspection.
Bursts were detected for all frequency bands, using both the EEG signal and the inverse of the EEG signal (because for mu-shaped rhythms, the sharper peaks resulted in better burst detection). Within each channel, overlapping bursts were compared, and the largest was retained intact. Smaller partially overlapping bursts were cut, and if the non-overlapping segment still retained 4 cycles, it was considered a new burst. Then, bursts were aggregated across channels based on temporal overlap (at least 50%) and if the mean frequency was within 1 Hz for the overlapping cycles.
Burst frequencies were defined as the reciprocal of the mean distances between negative peaks. Burst amplitudes were calculated by first averaging the rise and decay amplitudes of each cycle, then the average of these across all cycles in the aggregated bursts in different channels, then averaging the amplitude of all bursts within the band of interest. Burst quantities were calculated as the sum of all the cycles in the reference burst (the longest of all the overlapping bursts), divided by the duration of the recording, resulting in cycles per minute. This was chosen instead of the total number of bursts per minute because in extreme cases, bursts could become so long that their quantity decreased, and this was no longer representative of their occurrence in the data.
Figures S3A-S3B plots the distribution of the number of bursts by frequency for two example participants. Cycle-by-cycle analysis allowed clear differentiation between clusters of bursts by frequency. However, many individuals did not have two (theta/alpha), but in fact three or more clusters, and these distributions changed with time awake (best example: Figure S3A, Fixation). At the same time, other participants showed more classical bimodal distributions ( Figure S3B). Ideally, we would have used individualized bands to delineate theta and alpha, however these shifting distributions complicate such an approach. Therefore, we limited ourselves to group average results using traditional frequency bands. Furthermore, rather than quantifying the occurrence of a given oscillation by the number of bursts as shown in Figures S3A-S3C, we used instead the number of cycles per minute ( Figure S3G), as this also captures changes in burst duration ( Figure S3E).

Eye tracking & pupillometry
Eye tracking was done with Pupil Core ''glasses'' (Pupil Labs, Berlin, Germany). These were eyeglass frames with two rear-facing infra-red cameras. Pupil diameter was estimated from the video recorded with a iScience Article sampling rate of on average 120 Hz. Data was exported using Pupil Player. All analyses were then conducted with a sampling rate of 50 Hz. During measurements, the eye tracker failed multiple times, resulting in substantial data loss. Sleep loss further resulted in noisier data (more eye-closure, less fixed gaze, halfclosed eyelids).
The eye tracking variables blink rate and ocular microsleeps were measured using the confidence values of the pupil diameter estimates (from 0 to 1): when model confidence fell below 0.5, this was considered an eye-closure. This approach was chosen based on our observation of the video relative to the model confidence. Consecutive timepoints with confidence values over 0.5 that lasted less than 50 ms were still considered eyes-closed, and consecutive timepoints under 0.5 and less than 50 ms long were considered eyes open. The cutoff to split blinks and microsleeps was based on previous research identifying microsleeps as short as 1 s. 42 2D pupil diameter was estimated from the eye videos offline with Pupil Player, measured in pixels. Between the recordings, the eye tracking glasses were removed and readjusted. Therefore, in order to compare mean pupil diameter across sessions, the diameters in pixels had to be re-scaled. For every video, a frame was selected (192 3 192 pixels, 4.5 3 4.5 cm), and the eye's iris diameter was measured in centimeters (when viewed at an angle, a disk becomes an ellipse, and the largest diameter of the ellipse is the diameter of the disk). By using the human mean iris diameter (12 mm), a conversion factor was calculated between pixels and millimeters, and this was applied to all 2D pupil diameter measurements: pupil ðmmÞ = pupil À px Á 3 video width ðcmÞ 3 standard iris ðmmÞ iris ðcmÞ 3 video width À px Á While this does not preserve individual differences in eye-size, it is sufficient for comparing across-session changes in diameter within participants (reasonably assuming irises do not change in size with sleep pressure). Furthermore, it allows the exclusion of unphysiological outliers of diameter estimates.
Pupil preprocessing was done with the PhysioData toolbox. 80 Finally, removed datapoints less than 0.5 s were linearly interpolated, and then isolated chunks of datapoints less than 0.5 s were removed. Only data from one eye was used for each participant. The eye was chosen based on which had the most data after preprocessing.
To measure pupillary response to deviant tones during the Oddball, pupil diameters were epoched between À0.5 and 2 s relative to tone onset. All 40 targets were used, with 40 standards taken from the trial just prior to each target. Trials with less than 2/3 of clean timepoints were excluded. Recordings with less than 15 trials for either targets or standards were excluded. Furthermore, if any timepoint for a given tone type was derived by averaging fewer than 10 trials, this session was also excluded.
For each trial, the pupil response to tones was first baseline corrected (the mean between À0.5-0 s was subtracted from all datapoints in the trial), then all trials were averaged for each recording, split by target and standard tones. Participants with fewer than 6 recordings out of the 12 were excluded. Finally, average pupil responses for all timepoints, both targets and standards, and all sessions were z-scored within each participant. Pupillary response was calculated as the area under the curve between 0.5 and 2 s between target and standard.

QUANTIFICATION AND STATISTICAL ANALYSIS
To quantify the effects of extended wake, sleep, and the WMZ, for each outcome measure we conducted the same three paired t-tests. For wake-dependent changes, we compared values from the start and end of the 24 h extended wake period, S1 and S8. These were within 2 h of the same circadian phase, therefore any differences should largely be due to sleep homeostasis. To quantify sleep-dependent changes, we compared values from the wake recordings before and after the baseline night, BL Pre and BL Post. Unlike for wake changes, these were conducted at different circadian times and the difference in sleep homeostatic pressure was lower, however these are typical recordings during sleep studies.
To statistically quantify any deviation during the WMZ from the underlying trajectory of a given outcome measure, we linearly interpolated values from S5 (17: iScience Article converging results of subjective sleepiness ( Figure 2) and theta power ( Figure 3A), both of which showed a decrease in an otherwise monotonic increase during recordings S6 and S7, corresponding to 1-4 h before habitual bedtime.
All statistics were paired t-tests, such that p < 0.05 was considered statistically significant. All t-tests were conducted on z-scored values (pooling sessions and conditions for each participant) to better account for interindividual differences, provide more normally distributed datapoints, and more fair comparison of effect sizes across outcome measures. Due to occasional data loss for different outcome measures, the degrees of freedom are always provided, from which the sample size can be inferred (N = DF + 1).
Tests were selected a-priori for BL Pre vs BL Post to quantify overnight changes, and S1 vs S8 to quantify wake changes. To quantify the WMZ, a single value based on the average of the two recordings systematically showing effects (S6 and S7) were used. These were compared to an ''expected'' value based on S5 and S8, linearly interpolated. While previous studies quantified the effect by comparing WMZ values with measurements just prior, we considered this an under-estimate of the effect, as it doesn't take into account the overall trajectory of the data, i.e. what values those timepoints would have had without the presence of the WMZ. However, our method can also overestimate the WMZ, if either S5 or S8 deviated substantially from the rest of the recordings. Therefore, results were interpreted in the context of the trajectories observed in the figures.
Hedge's g effect sizes were reported for each test in Table 1, calculated with the Measures of Effect Size Toolbox. 81 Effect sizes are typically evaluated with Cohen's rule-of-thumb such that g values < 0.2 are ''small'', around 0.5 ''medium'', and > 0.8 ''large''. 82 To determine what effect sizes we had enough power for, we conducted a post-hoc statistical power analysis using standard values of a = .05 and 1-b = .8. For an N = 18, we had power for effect sizes of Hedge's g R 0.68, and N = 10 had power for Hedge's g R 0.95. While this is generally a limitation, both sleep deprivation effects and WMZ effects tend to be quite large. 23 No correction for multiple comparisons was done for these statistical tests as the majority were exploratory (e.g., Oddball/Standing conditions, pupil measures) or confirmatory (e.g., if amplitudes increase across wake, they should also decrease after sleep). Furthermore, there was a mixture of dependent and independent comparisons (e.g., power = amplitudes + quantities). All these t-tests were calculated in order to quantify the changes across outcome measures and thus compare effect sizes and relative robustness. The main hypothesis of whether both theta and alpha oscillation amplitudes increased with extended wake was a-priori selected for the Fixation condition. False-discovery rate correction 83 was however conducted for the 123 t-tests in each of the topographies of Figures 6C and 6D.
Throughout the text, the changes in average oscillation amplitude across extended wake are provided as average percent change from S1, with interquartile range (25% and 75% of the individuals) provided in brackets. This was used instead of standard deviation to better represent potentially skewed distributions. Likewise, the change in quantities of oscillations are described in the text as percentage of the entire recording, with corresponding interquartile ranges.