{'fraction_non_alphanumeric': 0.0333702221843875, 'fraction_numerical': 0.016997247524190573, 'mean_word_length': 4.889371657754011, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 2, 'https://': 2, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Overnight dynamics in scale-free and oscillatory spectral parameters of NREM sleep EEG

Unfolding the overnight dynamics in human sleep features plays a pivotal role in understanding sleep regulation. Studies revealed the complex reorganization of the frequency composition of sleep electroencephalogram (EEG) during the course of sleep, however the scale-free and the oscillatory measures remained undistinguished and improperly characterized before. By focusing on the first four non-rapid eye movement (NREM) periods of night sleep records of 251 healthy human subjects (4–69 years), here we reveal the flattening of spectral slopes and decrease in several measures of the spectral intercepts during consecutive sleep cycles. Slopes and intercepts are significant predictors of slow wave activity (SWA), the gold standard measure of sleep intensity. The overnight increase in spectral peak sizes (amplitudes relative to scale-free spectra) in the broad sigma range is paralleled by a U-shaped time course of peak frequencies in frontopolar regions. Although, the set of spectral indices analyzed herein reproduce known age- and sex-effects, the interindividual variability in spectral slope steepness is lower as compared to the variability in SWA. Findings indicate that distinct scale-free and oscillatory measures of sleep EEG could provide composite measures of sleep dynamics with low redundancy, potentially affording new insights into sleep regulatory processes in future studies.

The dynamics of NREM sleep EEG spectral features over consecutive sleep cycles is of crucial importance in understanding the regulation and the function of sleep 1,2 , as well as in revealing the physiological bases of insomnia 3 and major depressive disorder 4 . The well-known physiological marker of sleep intensity, the slow wave activity (SWA, power in the 0.75-4.5 Hz range) of sleep EEG was shown to decrease exponentially in consecutive sleep cycles 5,6 reflecting overall sleep-wake history 7 . Furthermore, much less emphasized observations suggest that in contrast to SWA, the power in several spectral bins of the sleep spindle frequency range increases across sleep cycles, whereas beta activity remains nearly stable over consecutive NREM periods 1 . In addition, the time course of gamma EEG activity is characterized by slight overnight increase 8 , whereas both beta and gamma frequency EEG activity in NREM sleep are attenuated after periods of extended wakefulness 9 . Last, but not least, both the occurrence rates and the amplitudes of slow and fast sleep spindles were characterized by changing dominance (overnight decreases and increases for slow and fast sleep spindles, respectively), whereas frequencies were shown to follow a U-shaped overnight distribution over consecutive sleep cycles, with decelerations of 0.1 Hz during the middle part of the sleep period for both sleep spindle types 10 . These findings indicate that the overnight dynamics of NREM sleep EEG is a complex and multi-faceted process, involving a broad range of frequencies of the spectrum, but these constituents are not yet fully unraveled at the current stage of knowledge in the field.
Prior research generally confirms that neurophysiological signals comprise a rhythmic oscillatory-, and an arrhythmic (or aperiodic) activity. Thanks to its special statistical property the scalp electroencephalogram (EEG) spectrum follows a power-law distribution 11,12 , thus, there is a linear relationship between the logarithm Scientific Reports | (2022) 12:18409 | https://doi.org/10.1038/s41598-022-23033-y www.nature.com/scientificreports/ of amplitude and the logarithm of frequency 13 . This 1/f relationship is the aperiodic component of the signal due to the self-evident scale-free being of the power-law functions. Namely, such a scale-invariant nature suggests that no specific frequency dominates the signal, rather, the spectral slope reflects the overall frequency composition within the time series. The oscillatory part of the power spectrum is shown as upward deflections in specific frequency bands. Analysing pre-defined oscillatory bands contains several possibilities for biases due to the so-called "researcher degrees of freedom" 14 . That is why the parametrization of neural power spectra has gained much importance in recent years 15 . Former reports on the aperiodic, 1/f-type measures of EEG suggest that depth of sleep or sleep intensity could indeed be reflected by the spectral slope (or exponent) of the signal. Findings which support this assumption were reported in studies revealing the sensitivity of EEG and electrocorticogram (ECoG) spectral slopes in discriminating wakefulness from states of reduced arousal including NREM and REM sleep, as well as general anesthesia or unconsciousness 16,17 . Furthermore, increasingly negatively sloped EEG and ECoG power spectra were reported from wakefulness through REM and N2 to N3 sleep states 11,18,19 . Last, but not least modelling studies indicate that spectral slopes of neural time series data reflect the ratio of inhibition over excitation in the underlying neural tissue, where increased inhibition associates with steeper slopes 20 . However, none of the above studies explicitly focused on across sleep cycle (or overnight) dynamics of spectral slopes, which is of crucial importance in depicting the regulatory aspects of sleep. Moreover, no former study analyzing 1/f-type activity characterized the dynamics of other parameters of the NREM sleep EEG spectra, namely the intercept (or amplitude multiplier) and the parameters of the major spectral peaks (peak power and peak frequency). Here we suggest that an appropriate separation of the rhythmic and aperiodic components of non-rapid eye movement (NREM) sleep EEG activity may provide feasible and non-redundant indicators of known across sleep cycle dynamics hypothetically linked to sleep regulatory processes.
Moreover, it was found that interindividual differences in slow wave sleep (SWS) and in quantitatively evaluated delta power in the NREM sleep are considerable, exceeding the effect sizes attributable to sleep-wake history 21,22 . The striking interindividual variability of healthy subjects lead several researchers to the conclusion that available laboratory measures of sleep are inappropriate for the construction of reference values 23 or for defining "normal" sleep 24 , reducing the sensitivity and specificity of clinical tests based on sleep parameters 22 . This means that despite its importance in sleep medicine and research, it is nearly impossible to give an exact metric as a standard for the measurement of overnight sleep dynamics and intensity. In order to provide a more comprehensive picture of across sleep cycle dynamics here we test the spectral slope and peak parameters in terms of overnight changes and associations with SWA. The set of parameters analyzed in our report were found to be composite, non-redundant and efficient in characterizing known age-sex-and cognitive correlates of sleep 14 .
Here we test the feasibility of describing overnight sleep dynamics by this set of parameters, assuming that we will encounter a lower interindividual variability, hence, opening the way to define reference values for healthy sleep cycle dynamics. In order to facilitate the reliance on reference values we publish detailed descriptive statistics of our dataset, which might help other researchers in circumscribing the range of healthy sleep in future studies.
We used the method from our earlier publication 14 to obtain the slope and the most prominent peak of the Fourier spectrum, that is, to distinct the periodic and aperiodic part of the NREM sleep EEG activity. In this, we proposed that there is a need to include a peak power function in the power law formula as follows: where, P is power as a function of frequency, P Peak is the peak power at frequency f (P Peak (f) = 1 if there is no peak and larger if there is), C is the intercept (a constant) which expresses the frequency-independent EEG amplitude, and α is the spectral slope (spectral exponent; negative number). The latter was associated with sleep depth and arousal level 17,18 . As in our previous work, we define f maxPeak as the frequency at which P Peak reaches its maximum level.
Based on previously published and above cited findings, our main hypotheses are the following: -The spectral slope (α) and peak amplitude (the maxima of P Peak ) increase during successive NREM periods (indicating flattening spectra and increasing oscillatory spindle activities, respectively). -Spectral slope correlates negatively with SWA, the gold-standard measure of sleep intensity. -The f maxPeak values (i.e. the frequency of the largest peak in the spindle range) in the frontopolar and parietooccipital regions are characterized by a U-shaped distribution across consecutive sleep cycles (reflecting the overnight dynamics of slow and fast sleep spindle frequencies, respectively). -f maxPeak values in the central regions are characterized by a linear increase over the night (reflecting the changing dominance of fast over slow sleep spindles which are mixed in this region).

Results
The number of full sleep cycles were between 2 and 5 among participants (mean: 4.25). All subjects (N = 251) had at least two, 249 had at least three, 240 had four or more, and 75 had five complete sleep cycles. The last (5th) cycles were not included in the models because they would have reduced the sample size considerably. The main effect of hemisphere (left vs. right) was not significant in either of the models, so it was not investigated further (p > 0.05).
Goodness-of-fit in the separate sleep cycles. As in our earlier publication 14 , the equidistant log-log plots of the NREM EEG power spectra were fitted with linear functions below 48 Hz, furthermore, these fittings was performed with the exclusion of the 0-2 and the 6-18 Hz range to avoid spectral peaks such as slow here, and throughout the text, the marks y.adult and m.a.adult refers to young adults and middle-aged adults, respectively) and region (F(4,928) = 211.14, p < 0.001, N = 240) had significant main effects on the slope of the spectrum: later cycles, older ages and more posterior regions predicted smaller absolute values of the spectral slope parameters. In addition these main effects interacted as follows: cycle × age groups (F(9,696) = 15, p < 0.0001), region × age groups (F(12,928) = 3.66, p < 0.0001), cycle × region (F(12,2784) = 51.92, p < 0.0001), indicating accelerated overnight slope changes in children as compared to adults, lack of striking regional differences in children, and regional differences in overnight dynamics, respectively. Post hoc test (see results in Table 2) revealed that slope values were significantly higher (smaller absolute value i.e., flatter slope) in each sleep cycle compared to the preceding ones in the young adult group (see an example in Fig. 1). However, in the children and teenager groups this significantly increasing effect throughout the night was evident just for the first three cycles. Only a trend appeared in the fourth cycles for this effect. Finally, in the middle-aged group, the increment of the spectral slope values was smaller during sleep which resulted in the lack of a significant difference between successive cycles (Fig. 2a). The differences between regions were significant in all cycles (Fig. 2b). Amplitudes of the largest peaks were significantly affected by age group (F(3) = 11.93, p < 0.001, N child = 9, N teenager = 33, N y.adult = 125, N m.a.adult = 22), cycle (F(3) = 78.45, p < 0.001, N = 189), and region (F(4) = 56.94, p < 0.001, N = 189). Effect of sex was not significant. Cycle × age group (F(9) = 3.65, p < 0.001), region × age group (F(12) = 8.67, p < 0.001), cycle × region (F(12) = 16.64, p < 0.001), indicating attenuated overnight spectral peak amplitude increase in middle-aged adult subjects, decreased peak amplitude in centro-posterior regions of children, faster overnight amplitude increase in posterior regions, respectively. Post hoc test of cycle × age group interaction revealed a significant increase in peak amplitudes throughout the 4 sleep cycles in the young adult group (Table 2).
Overnight dynamics of SWA and its correlation with the slope. The same models were used to assess SWA at derivation F3. As SWA values are squared numbers, these data evidently do not meet the criteria of parametric statistical tests. Consequently, before running the statistical tests a logarithmic transformation was performed. Nonetheless, the original parameter is the one which is often used in the literature. That is why the Figure 1. Example for cycle dynamics of spectral slopes and peak frequencies in a 20-year-old male subject in the right frontopolar EEG location (Fp2). C1, C2, C3, C4 reflects cycles 1-4, respectively. Note that slope values show a non-linear increase. Furthermore, the frequencies of the largest peak form a U-shape curve throughout the night, that is, in the middle of the night the peak frequencies are lower than in cycle 1 and 4. .68, p < 0.001), in addition, the interaction between them (SWA: F(9,696) = 153.85, p < 0.001; lnSWA: F(9,696) = 5.42, p < 0.001) was evident. Although a significant decrease in logarithmized SWA was evident in all age groups in all cycles according to the post hoc tests (p < 0.001), in case of the classical SWA this effect was only significant in the children and young adult group for the first three (p < 0.01), and in the teenager group for the first two cycles (p < 0.001). In the other cycles and in the middle-aged group the decreasing trend was not significant (p > 0.05) (Fig. 3).
In order to test whether spectral slope values and the natural logarithm of SWA index are overlapping concepts Pearson correlation analyses were applied. Analyses were focused on the left frontal recording location (F3). Significant, negative, moderate to strong correlations were found in all cycles between the two metrics ( Interindividual differences in slope and SWA (/lnSWA) values. Our main goal was to propose a sleep intensity index which varies less among people than the slow wave activity. Thus, we checked the amount of outliers as well as the coefficients of variation in these two metrics (slope values and SWA) at derivation F3 (Fig. 5).  www.nature.com/scientificreports/ In order to make the two measures (spectral slopes and lnSWA) comparable there was a need to rescale them according to a common absolute null point, which is a pre-requisite of assessing a relative standard deviation (coefficient of variation). As neither lnSWA nor the slope values were lower than − 4 we add 4 to both variables in all individual datapoints. Based on this rescaling we could calculate the coefficients of variation in both metrics which proved to be more than twice higher in the lnSWA as compared to the spectral slopes (Table 1).
These effects indicate the already reported lower sleep spindle frequencies in children, adult males, earlier sleep cycles, and more anterior regions, respectively. Although f maxPeak values formed a U-shape-like curve throughout the first 4 sleep cycles (Fig. 6), post hoc test revealed that the first 3 cycles were not significantly different from each other, whereas the f maxPeak values in the 4th cycle were significantly higher than in the others. During the night, the overall frequency increase along the anterior-posterior axis was 1.53 Hz in the 1st, 1.59 Hz in the 2nd, 1.5 Hz in the 3rd, and 1.14 Hz was in the 4th sleep cycle. The maximal value and location of the frequency shifts were also estimated in the different sleep cycles. Antero-posterior frequency shifts in adjacent (para)sagittal regions were tested by an adaptation of the Kullback-Leibler distance type measure involving surrogate control analyses 25 . Tests revealed striking divergences of empirically measured antero-posterior frequency shifts from the uniform distribution indicating largely non-continuous rostro-caudal changes in the frequencies of maximal spectral peaks (Z-values of the Kullback-Leibler distances were 64.69, 84.26, 80.97, and 61.77 for cycles 1, 2, 3, and 4, respectively, p < 0.00001 for each cycle). In terms of descriptive statistics, we found that the maximal frequency shift has a dominant location in every cycle. In the first, second and fourth sleep cycles the central to frontal region was the location of the maximal frequency shift for most of the sample (54.2%, 50.6%, and 40.6%, respectively), whereas in the third cycle, the 45% of the subjects had their maximal frequency shift in the frontal to frontopolar region (Suppl. Table 1). Significant interaction between sleep cycles × age groups was observed (F(9,543) = 2.38, p = 0.012). Post hoc test of cycle and age groups interaction revealed that f maxPeak values in the fourth cycles of teenagers and young adults are higher than in the previous ones ( Table 2). There was a trend for a U-shaped curve (higher first and fourth cycle, lower middle cycles) for all but the middle-aged adult group (Fig. 6). Effects of sleep cycles on maximal peak frequencies depended on electrode location (cycle × region: F(12,2172) = 5.34, p < 0.001). In the frontopolar regions the maximal peak frequencies in the second and third cycles were significantly lower than in the first and fourth (see also Fig. 1). In the parietal and occipital regions there was a trend for this effect, however, the peak frequencies in the frontal and central area did not show a U-shaped curve throughout the night ( Table 2). Region and age groups significantly interacted in predicting spectral peak frequencies (F(12,724) = 9.51, p < 0.0001). That is, children had significantly lower peak frequencies in central, parietal and occipital regions than the other groups, whereas teenagers had higher frontopolar and frontal peak frequency values than middle aged adults in the same regions ( Fig. 6; Suppl. Table 2, Suppl. Table 3).

Discussion
A precise description of the overnight dynamics of sleep EEG is essential for a better recognition of sleep characteristics and for understanding the underlying processes. In this proof-of-concept study we focused on overnight dynamics of the parameters that describe the power law scaling of the NREM EEG spectrum based on the analysis of successive sleep cycles. Overall, we found that both aperiodic and periodic components of the Fourier spectra undergo remarkable overnight changes. Namely, the slope values increased (absolute values decreased) and the alternative intercepts decreased during the night, besides, the largest peak of the spectrum was characterized by continuously increasing amplitudes in consecutive NREM episodes, and decreased frequencies in the middle of the night in the frontopolar region (U-shape curve in consecutive sleep cycles). Our findings suggest that sleep intensity can be approached by the scale-free measure of frequency dependent decay rate of EEG power, that is by the spectral slope (in the log-log plane) or spectral exponent (in the linear coordinate system). However, the absolute value of the spectral slope (exponent) is not the only measure characterized by overnight decreasing dynamics, nor in predicting SWA, the gold standard measure of sleep intensity. The alternative intercept measure termed lnC 2.5 is characterized by similar features. Furthermore, the maximal peak frequencies of the Fourier spectra decelerate in the 2. and 3. sleep cycles in the frontopolar, but not in the frontal and central regions. The latter regions might be characterized by the reorganization of the fast and slow spindles during the night.
The number of studies indicating that the power-law exponent of EEG spectra is a correlate of sleep depth, consciousness, and arousal increases steadily. Reduced conscious awareness (or arousal) was related to steeper spectral slopes in these studies [16][17][18] . Besides, in our former study 14 , we found that aging was associated with decreased steepness of the whole night NREM sleep EEG Fourier spectra. This finding coheres with the literature indicating decreased SWA 26 and at the same time increased high frequency EEG activity 27 in the aged. In the present study, we analyzed the cycle-to-cycle dynamics of spectral exponents, as well as SWA at derivation F3. In coherence with the above-mentioned reports, we found an overall age effect in spectral slopes (exponents), SWA and lnSWA. That is with aging, the absolute values of the NREM sleep EEG spectral slopes got smaller at all derivations and in all sleep cycles, whereas the well-known SWA reduction with the progression of age was also evident. A decrement in stage 3 or slow wave sleep, and in slow wave activity (for an overview see 26 ) was often associated with the reduction of sleep depth in the elderly. Further similarities between the spectral slopes and SWA was seen in the cycle dynamics of the metrics. Regarding slope values an increasing trend (absolute values declining) can be seen in all age groups throughout the cycles and the opposite trends (because of the opposite sign) were seen in the cycle dynamics of SWA and lnSWA. Thus, increasing and decreasing spectral exponents and SWA in successive sleep cycle were significant in the whole sample, respectively. However, this cycle effect was not significant neither with respect to slopes nor in terms of SWA in the middle-aged group (Fig. 3, Table 2). That is, the increase of the slope values and decrease of SWA throughout the night was smaller in middle-aged as compared to younger subjects. This finding parallels earlier reports on the reduced decay rate of SWA in aged subjects and can be modelled by the assumed attenuation of sleep efficiency in the elderly 28,29 . Nevertheless, it seems that the slope of the Fourier spectrum behaves similar to the classical SWA. Not only with respect to their non-linear decay as sleep progresses, but also regarding age and their regional differences www.nature.com/scientificreports/ along the fronto-posterior gradient. In the frontal and central regions, the slope was steeper than in the occipital region. It is known that delta waves have higher values over the frontal areas 30 . Furthermore, the two metrics highly correlated which fact alone suggest a convergent validity of the slope. In the light of former studies on sleep depth and spectral exponents and our findings on the spectral slopes in relation with age, cycle dynamics and regional differences, we can suggest that α can be a promising alternative indicator of sleep intensity. Although the reliability and trait-like nature of SWA is indisputable, the slope also has its own advantages. Firstly, this metric is normally distributed, which makes it "usable" in standard statistical models. Secondly, its variability between individuals is much smaller than the interindividual variability of the SWA, even if the log-normalized value of the SWA is considered. That is, the spectral slope is a less individual specific metric. One of the largest criticism in the literature with regard to SWA is its large interindividual variability which make impossible to set up a given reference point for healthy sleep [22][23][24] . Although slope values smooth down the individual trait effects of specific to the particular subjects as compared to SWA, yet it does not completely blur the fundamental individual differences (such as age or regional), thus it could provide a road toward setting up reference values of sleep intensity in later studies. If this assumption holds true, in the future, we could make difference between healthy and unhealthy sleep with the help of this metric, but less between two individuals with healthy sleep (which latter is one of the main advantage of the classical power values in general and SWA in particular). Hints for the reliability of this assumption were already published in a report indicating flattened spectral slopes in insomnia and sleep misperception subjects 31 . Of course, this idea needs further investigations including even larger datasets, protocols involving the experimental challenge of the sleep homeostat, and /or, measurements of the same subjects across time to reveal inter-and intraindividual differences more widely. The overnight dynamics of the "slope-free" alternative intercepts were also tested. Results were similar to the ones reported for the spectral slopes in terms of cycle, age, and region effects. However, we found that these alternative intercepts are not independent from the slope if we parametrize the spectra in separate sleep cycles. Indeed, the regression models revealed that these intercepts and the spectral slopes are reliable predictors of SWA. A social isolation EEG study found reduction in broadband power as a result of isolation 32 , suggesting the neural origin and homeostatic relevance of the spectral intercept. However, for a better understanding of the role of broadband power/spectral intercept, as well as the dynamical change of the assumed slope-free intercept during the successive sleep cycles, future studies should explicitly focus on this phenomenon.
Maximal peak frequency values in the spindle frequency range (9-18 Hz) were hypothesized to show a U-shaped distribution over consecutive sleep cycles in the frontopolar and parieto-occipital regions. In a recent report 10 we revealed that slow and fast sleep spindle frequencies display a U-shaped overnight dynamic, dampening with age and during daytime-sleep sleep spindles are faster than during the night. While our former study revealing the U-shaped overnight dynamics of sleep spindle frequencies was based on the Individual Adjustment Method (IAM) 10 , here we relied on the peak frequency of the whitened power spectra of NREM sleep EEG. Whitening means the removal of the power law trend of the spectra, a step implemented before peak detection in the current, but not in our former study based on the inflection points of the amplitude spectra of NREM sleep EEG. Further differences between our current spectral parametrization and former IAM-based study find its roots in the robust, overall mean frequencies used in the IAM, which contrast the EEG recording locationspecific approach in the present report. Last, but not least, IAM sleep spindle frequencies are categorized into slow and fast instances based on both frequency and topography, whereas this distinction is not inherent to the current approach during which we only focused on the EEG recording-specific maxima of the whitened power. Anyhow, the known sex 33,34 , age 35,36 , and region 37 effects on sleep spindle frequencies were reproduced by this measure. Namely, women had higher, children had lower maximal peak frequencies than men and other age groups, respectively. Furthermore, maximal peak frequencies were lower in anterior as compared to posterior regions. That is, the frequency of the largest peak is roughly corresponding to the sleep spindle frequency. In the present report we found a significant U-shaped curve dynamic of maximal oscillatory peak frequency in the frontopolar region. However, in the frontal and central regions the maximal peak frequencies did not show U-shaped curve during the night. This phenomenon can be due to the changing predominance of slow and fast spindles in consecutive sleep cycles. Fast spindle frequency activity was found to increase during the night, but at the same time a decrease in slow frequency spindling activity was also reported 37,38 . Indeed, in the present study we found that the amplitude of the largest peaks increased in consecutive sleep cycles. As the regional differences between the fast and slow spindle frequencies are powerful and there is a well-known spindle activity growing during the night, it is possible that we see the blurring of the two types of spindles moving towards the central regions. Indeed, in the first two cycles, the dominant location of the maximal frequency shift was the central-to-frontal area in the sample. For the third cycle, this maximal frequency shift moved forward to the frontal-to frontopolar region. This phenomenon can be due to the increase of the fast spindle dominance. However, although in the 4th cycle the maximal frequency shift was occurred again in the central-to-frontal area in most of the subjects (~ 40% of the sample), the difference between the percentage distribution regarding the most and second most dominant location of the maximal frequency shifts getting smaller as the cycles progressed (see Suppl. Table 1). That is, there is an obvious central-to-frontal predominance of the maximal frequency shift in the first cycle but nearly-equal dominances in the 4th cycle regarding central-to-frontal and frontal-to-frontopolar areas. Thus, we suggest that the cycle dynamic of the maximal peak frequencies is contaminated by nocturnal reorganization of the fast and slow spindles in these regions.
There is a lack of and a desperate need for a set of reliable, standardisable polysomnography markers suitable for the assessment of sleep regulation and quality. Such EEG indicators would reduce the complicatedness and arbitrariness of measuring healthy sleep in the related fields of research and medicine. With the present report, we aimed to describe the overnight dynamics of both periodic and aperiodic components of the NREM EEG power spectra. We would like to draw attention to the possibility that these nocturnal patterns may reveal important information on assumed sleep regulatory processes, thus, the description of them is an essential initial step in Power spectral analysis. Artefact-free, 4 s epochs with 2 s overlap were Hanning-tapered, mixed-radix fast Fourier transformed, power spectra derived in μV 2 /0.25 Hz. Furthermore, EEG location-specific average power spectral density of the NREM (N2 and N3) periods of sleep cycles was calculated.
Definition of SWA. Slow-wave activity was defined as the power spectral density of 0.75-4.5 Hz EEG activity (sum of the bin power values). Analysis was performed on the left frontal EEG recording location (F3) and averaged in chunks of NREM (N2 and N3) periods of complete sleep cycles.
Spectrum parametrization. The comprehensive description of the parametrization of the power spectra can be seen in our earlier publication 14 , here, the basic steps are summarized. The log-log scale of NREM (N2 and N3) sleep EEG spectra was interpolated to equidistant bins of the smallest frequency step (piecewise cubic Hermite interpolation, 0.0052 Hz). To estimate the slope of the spectrum a linear function was fitted to the data but the frequency ranges below 2 and between 6 and 18 were excluded to avoid the non-random oscillatory parts. The peak detection was conducted in the 9-18 Hz frequency range, known as broad sigma range, searching for local maxima and minima in mathematical terms. Thus, we used the first and second derivative to define critical points and differentiate maxima and minima, respectively. A spectral peak was detected and accepted if the first derivative was equal 0 and the second derivative was smaller than 0.
Statistical analysis. The 251 subjects were organized in groups along age as in our earlier report 40 . The age ranges in the resulting four groups were the following: 4 years ≤ children < 10 years, N = 31, 15 females; 10 years ≤ teenagers < 20 years, N = 36, 18 females; 20 years ≤ young adults < 40 years, N = 150, 75 females; and 40 years ≤ middle-aged adults ≤ 69 years, N = 34, 14 females. All statistical analyses were carried out with Statistica 13 software. We used general linear models to test our hypotheses. Age groups and sex were between-subject factors whereas sleep cycle, region (frontopolar, frontal, central, parietal, occipital) and hemisphere (left, right) serve as within-subject factors in the models. Second level interactions of the variables with significant main effects are considered herein. With respect to SWA, a logarithmic transformation was also applied. The values of SWA are squared numbers which do not meet the criteria of parametric statistical tests. Thus, in the comparison with the spectral slope we used the logarithm of the SWA values (lnSWA). Furthermore, as SWA was calculated only on the left frontal EEG location we did not include region and hemisphere as factors in the statistical models where we analysed SWA or lnSWA. In case of significant effects or interactions we used the Unequal N HSD post hoc test for further examinations. The antero-posterior distributions of spectral peak frequencies were tested by the following procedure. First, we formed parasagittal regions by averaging peak frequency values in frontopolar (Fp1, Fp2), frontal (F3, F4), central (C3, C4), parietal (P3, P4), as well as occipital (O1, O2) recording locations. In the following, the regional means of spectral peak frequencies were serially subtracted in adjacent antero-posterior regions  14 . These successive frequency shifts were subjected to an analysis based on an adaptation of the Kullback-Leibler distance (KL distance) 25 which is widely used in statistics for estimating the difference between two distributions. The mean frequency shifts were calculated for adjacent locations as 4 bins (frontal-frontopolar, central-frontal, parietal-central, occipitalparietal) and normalized dividing each bin value by the sum over the bins, which defines the distribution P(x). The uniform distribution Q(x) was defined as the equal distribution over the four bins, 0.25. The KL distance were then calculated using the following formula: KL = sum(P(x)*log(P(x)/Q(x))). Specifically, we compared the empirical frequency shifts with the outcomes of a randomization based on 1000 iterations in each of the 4 sleep cycles separately. The observed KL values were then z-standardized to the shuffled values, where normalized z-values directly reflect p-values, Z-values of the Kullback-Leibler distances equal to 1.645 corresponds to the 5% p-value, and larger values reflect p < 0.05. We aimed to test if region-specific differences in peak frequencies form a uniform antero-posterior distribution with an equal probability of antero-posterior changes over all adjacent parasagittal regions (null hypothesis assuming continuous antero-posterior changes in peak frequencies) or the changes are non-continuous (assuming a differentiation between slow and fast types of sleep spindles based on non-continuous antero-posterior shifts). Furthermore, we provided a descriptive analysis on the dominant (maximal) frequency shift in each sleep cycle based on our former approach 14 .
Ethical statement. We confirm that we have read the Journal's position on issues involved in ethical publication and affirm that this report is consistent with those guidelines.

Data availability
All data generated or analysed during this study are included in this published article (and its Supplementary Information files). The datasets generated during and/or analysed during the current study are available in the OSF repository, https:// osf. io/ q37w4/.