scieee AI-readable full text Open interactive document viewer

Seizure likelihood varies with day-to-day variations in sleep duration in patients with refractory focal epilepsy: A longitudinal electroencephalography investigation

Dell, Katrina L.; Payne, Daniel E.; Křemen, Václav; Maturana, Matias I.; Gerla, Václav; Nejedlý, Petr; Worrell, Gregory; Lhotska, Lenka; Mívalt, Filip; Boston, Raymond C.; Brinkmann, Benjamin H.; Wendyl, D'Souza; Burkitt, Anthony N.; Grayden, David B.; K

Abstract

Background: While the effects of prolonged sleep deprivation (24 h) on seizure occurrence has been thoroughly explored, little is known about the effects of day-to-day variations in the duration and quality of sleep on seizure probability. A better understanding of the interaction between sleep and seizures may help to improve seizure management. Methods: To explore how sleep and epileptic seizures are associated, we analysed continuous intracranial electroencephalography (EEG) recordings collected from 10 patients with refractory focal epilepsy undergoing ordinary life activities between 2010 and 2012 from three clinical centres (Austin Health, The Royal Melbourne Hospital, and St Vincent's Hospital of the Melbourne University Epilepsy Group). A total of 4340 days of sleep-wake data were analysed (average 434 days per patient). EEG data were sleep scored using a semi-automated machine learning approach into wake, stages one, two, and three non-rapid eye movement sleep, and rapid eye movement sleep categories. Findings: Seizure probability changes with day-to-day variations in sleep duration. Logistic regression models revealed that an increase in sleep duration, by 1·66 ± 0·52 h, lowered the odds of seizure by 27% in the following 48 h. Following a seizure, patients slept for longer durations and if a seizure occurred during sleep, then sleep quality was also reduced with increased time spent aroused from sleep and reduced rapid eye movement sleep. Interpretation: Our results suggest that day-to-day deviations from regular sleep duration correlates with changes in seizure probability. Sleeping longer, by 1·66 ± 0·52 h, may offer protective effects for patients with refractory focal epilepsy, reducing seizure risk. Furthermore, the occurrence of a seizure may disrupt sleep patterns by elongating sleep and, if the seizure occurs during sleep, reducing its quality.

Full text

Research paper Seizure likelihood varies with day-to-day variations in sleep duration in patients with refractory focal epilepsy: A longitudinal electroencephalography investigation Katrina L. Dell a, *, Daniel E. Payne a,b , Vaclav Kremen c,d , Matias I. Maturana a,e , Vaclav Gerla d , Petr Nejedly c , Gregory A. Worrell c , Lhotska Lenka d , Filip Mivalt c , Raymond C. Boston a,f , Benjamin H. Brinkmann c , Wendyl D’Souza a , Anthony N. Burkitt b , David B. Grayden b , Levin Kuhlmann a,g , Dean R. Freestone e , Mark J. Cook a a Department of Medicine, St. Vincent’s Hospital, University of Melbourne, Level 4, 29 Regent Street, Fitzroy, Victoria 3065, Australia b Department of Biomedical Engineering, University of Melbourne, Melbourne, Victoria, Australia c Department of Neurology, Mayo Clinic, Rochester, United States d Czech Institute of Informatics, Robotics, and Cybernetics, Czech Technical University in Prague, Prague, Czech Republic e Seer Medical, Melbourne, Victoria, Australia f Department of Clinical Studies - NBC, University of Pennsylvania, School of Veterinary Medicine, Kennett Square, PA, United States g Department of Data Science and AI, Faculty of Information and Technology, Monash University, Clayton, Victoria, Australia ARTICLE INFO Article History: Received 29 March 2021 Revised 3 May 2021 Accepted 13 May 2021 Available online 5 June 2021 ABSTRACT Background: While the effects of prolonged sleep deprivation (24 h) on seizure occurrence has been thoroughly explored, little is known about the effects of day-to-day variations in the duration and quality of sleep on seizure probability. A better understanding of the interaction between sleep and seizures may help to improve seizure management. Methods: To explore how sleep and epileptic seizures are associated, we analysed continuous intracranial electroencephalography (EEG) recordings collected from 10 patients with refractory focal epilepsy undergoing ordinary life activities between 2010 and 2012 from three clinical centres (Austin Health, The Royal Melbourne Hospital, and St Vincent’s Hospital of the Melbourne University Epilepsy Group). A total of 4340 days of sleep-wake data were analysed (average 434 days per patient). EEG data were sleep scored using a semiautomated machine learning approach into wake, stages one, two, and three non-rapid eye movement sleep, and rapid eye movement sleep categories. Findings: Seizure probability changes with day-to-day variations in sleep duration. Logistic regression models revealed that an increase in sleep duration, by 1¢66 §0¢52 h, lowered the odds of seizure by 27% in the following 48 h. Following a seizure, patients slept for longer durations and if a seizure occurred during sleep, then sleep quality was also reduced with increased time spent aroused from sleep and reduced rapid eye movement sleep. Interpretation: Our results suggest that day-to-day deviations from regular sleep duration correlates with changes in seizure probability. Sleeping longer, by 1¢66 §0¢52 h, may offer protective effects for patients with refractory focal epilepsy, reducing seizure risk. Furthermore, the occurrence of a seizure may disrupt sleep patterns by elongating sleep and, if the seizure occurs during sleep, reducing its quality. Funding: This research was supported by Australian National Health and Medical Research Council Project Grant 1130468, US National Institutes of Health Grant R01 NS09288203, Czech Technical University in Prague Grant OHK4-026/21 and Epilepsy Foundation of America Innovation Institute, My Seizure Gauge. © 2021 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/) Keywords: Epilepsy Seizures Convulsions Sleep Sleep quality Sleep duration Sleep composition Sleep architecture Rapid eye movement Long-term EEG Electroencephalography Non-rapid eye movement 1. Introduction Sleep and epileptic seizures share a complex and bidirectional relationship [1]. Deviations from normal sleep duration and quality can greatly influence the risk of a seizure [2]. In turn, the occurrence and treatment of seizures can disrupt normal sleep patterns [35]. Understanding the complexities of this relationship is an important step toward improving seizure management. While it is generally accepted that total sleep deprivation for periods of 24 h or longer can lead to seizures, even in individuals that do not have epilepsy [6,7], the role of partial sleep deprivation in * Corresponding author. E-mail address: [email protected] (K.L. Dell). https://doi.org/10.1016/j.eclinm.2021.100934 2589-5370/© 2021 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/) EClinicalMedicine 37 (2021) 100934 Contents lists available at ScienceDirect EClinicalMedicine journal homepage: https://www.journals.elsevier.com/eclinicalmedicine promoting seizures remains controversial [8,9]. Of four studies using self-reported sleep and seizure information, three indicated that partial sleep deprivation increased the probability of a seizure [911], while the fourth reported a small degree (<1 h) of sleep loss did not influence seizure occurrence at all [8]. To our knowledge, no electroencephalography (EEG) investigations have addressed the role of partial sleep deprivation. Similar uncertainty exists regarding the effects of sleep quality on seizure propensity in people with epilepsy. Typically, sleep quality is quantified by the absolute or percentage of time spent in each sleep stage as well as the degree of sleep fragmentation or time spent awake after sleep onset [12]. Sleep with more frequent/longer arousals, reduced rapid eye movement (REM) sleep, or reduced stage three nonrapid eye movement (NREM) sleep is generally considered to be less restorative [13]. Studies that have selectively manipulated REM sleep duration suggest that increased REM sleep may act to reduce cortical excitability and, in turn, seizure occurrence [14,15]. However, it is yet to be determined if day-to-day variations in REM sleep, deep sleep, or sleep fragmentation can influence seizure occurrence in humans. The influence of sleep on seizure risk is further complicated by the effects that seizures themselves have on sleep duration and quality. Short-term EEG investigations have shown following a focal impaired awareness or focal to bilateral tonic-clonic seizure, there is a reduction in the proportion of REM sleep. When the seizure occurs during sleep, this reduction in REM sleep is more pronounced and is accompanied by an increase in stage one NREM and decreases in stage two NREM and deep sleep [5]. Similar disruptions have been observed for up to four nights following generalised convulsive status epilepticus, where sleep consists predominantly of stage one NREM with minimal REM and deep sleep [16]. These alterations in sleep may play an important role in the generation of subsequent seizures. Until now, long-term (>12 weeks) investigations of sleep and epilepsy have relied on seizure diaries. This is problematic as seizure diaries are highly unreliable, with patients often reporting less than 50% of their seizures [17,18]. Furthermore, short-term EEG investigations do not have the statistical power to investigate the effects of subtle changes in sleep duration or quality on seizure occurrence. The small number of seizures collected per patient in a typical EEG study usually requires the data to be collapsed across patients for analyses, which is problematic given the high degree of variability that exists between individuals [19,20]. Furthermore, the majority of EEG data is collected in a hospital setting, often with medication withdrawal and deliberate sleep deprivation, which is unlikely to be representative of the true sleep and seizure trends that occur in dayto-day life. Here, we present the first study using long-term ambulatory intracranial EEG data (spanning several months to years for each patient) to investigate the relationship between sleep and seizures. Recordings were classified into sleep stages and analysed to describe sleep-wake patterns in our patient group. Our objective was to explore and define the bidirectional relationship between seizures and sleep duration and composition. Our results demonstrate that an increase in sleep duration is correlated with reduced seizure odds in the following 48 h, which may imply that increased sleep duration offers protective effects. Variability in sleep stage proportions produced variable effects across patients, with no significant change in the odds of a seizure in the following 48 h. The occurrence of a seizure is followed by longer sleep durations and, if a seizure occurs during sleep, sleep quality is reduced with a lower proportion of REM sleep and a greater proportion of time spent in brief arousal. 2. Methods 2.1. Data The data used in this study were collected between 2010 and 2012 as part of the first-in-man clinical trial of an implantable seizure advisory system which was approved by the Human Research Ethics Committees of the three participating clinical centres: Austin Health, The Royal Melbourne Hospital, and St Vincent’s Hospital of the Melbourne University Epilepsy Group (LRR145/13) [17]. Patient selection prioritised suitable seizure frequencies (between 2 and 12 per month) and adults with sufficient independence to make the implanted seizure advisory device useful for managing daily activities. All patients gave written informed consent before participation in the clinical trial. Fifteen patients with focal epilepsy were implanted with an intracranial EEG device recording at 400 Hz. Periods where the external device was not in range of the transmitter or periods where the device was not charged caused dropouts in the data. The patient cohort showed a range of demographic and clinical features that is typical of the wider refractory epilepsy population, with a range of aetiologies, and including patients on multiple antiseizure drugs, as well as patients on minimal therapy. The patient details and recording durations are provided in Table 1. Patients 3, 4, 5, 7, and 14 from the original trial were excluded from analyses as we did not have sleep information for these patients. There were no significant differences between the included and excluded patient Research in context: Evidence before this study We searched the literature for studies on sleep and seizures published in MEDLINE (from 1946 to June, 2020) and Embase (from 1974 to June, 2020). We used comprehensive search strategies combining terms “epilepsy”,“seizures”,“precipitants”,“sleep”,“deprivation”,“quality”,“composition”,“architecture”,“rapid eye movement”, and “non-rapid eye movement”. No language restrictions were applied. The bibliographies of relevant reviews and included journal articles were also inspected for additional relevant studies. While many authors accept that sleep has an important impact on seizure propensity, only 4 longitudinal studies have specifically addressed the effects of regular sleep duration variability on seizure likelihood. We did not find any longitudinal studies addressing the effects of sleep quality on seizure probability. Existing investigations have either relied on sleep and seizure diaries, which are known to be inaccurate, or on EEG collected within a hospital environment, which is unlikely to be representative of the true relationship between sleep and seizures and whose short-term (<14 days) nature lacks the statistical power for the analyses conducted here. Added value of this study Our study uses continuous data that was collected via intracranial EEG from ten patients undergoing ordinary life activities and spanned over months to years. This long-term data allowed us to explore the association between seizures and the duration and composition of sleep. Implications of all the available evidence A small increase in sleep duration was associated with a lower seizure propensity, though interestingly, a small reduction in sleep duration did not produce consistent effects. The occurrence of a seizure was followed by altered sleep patterns with patients sleeping for longer durations and if the seizure occurred during sleep, sleep quality was also reduced with an increased amount of time spent aroused from sleep and a decrease in rapid eye movement sleep. 2K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 groups according to age (t(13)=0¢76, p=0¢46), sex (X 2 (1, N= 15)=1¢25, p=0¢26), frequency of previous resection (X 2 (1, N= 15)=0, p= 1), seizure count (t(13)=0¢94, p=0¢36) or drug load (t(13)=0¢67, p=0¢51), and thus we do not expect the exclusion of five patients to bias the results of this investigation. Sleep related comorbidities were ruled out for our patient group by clinical history and in-patient video EEG. For further details regarding the recruitment criteria, patient demographic and clinical procedures, see Cook et al. [17]. Seizure detections were verified by certified clinicians and expert investigators with the aid of seizure diaries and audio recorded from the portable seizure advisory device. 2.2. Sleep-wake scoring Intracranial EEG was scored in 30 s epochs into awake, stage one NREM (NREM1), stage two NREM (NREM2), stage three NREM (NREM3), or REM sleep categories based on methods adapted from Kremen et al. [22]. These methods have previously been confirmed and validated on intracranial EEG data with concurrent polysomnography and gold standard sleep scoring according to AASM2012 rules across multiple investigations and have yielded an average accuracy of 94% with Cohen’s kappa of 0.8732 for NREM2, NREM3 and awake states, and with REM sleep included an average of 91% in humans and 94% in dogs (not shown). The accuracy of stage 1 NREM sleep was less reliable, presumably because it is relatively infrequent, accounting for very little of the total sleep duration, and is very similar electrographically to the awake state. For this reason, we do not draw any major conclusions regarding this sleep type. Furthermore, any spontaneous NREM1 occurring separate from other sleep scores were ignored when marking sleep onset and offset transitions and were not included in the total sleep duration. Sleep scoring was conducted using one representative electrode or the median of all electrodes selected manually by reviewer judgement. For each patient, nine days at equidistant positions throughout the dataset were manually sleep-wake scored and used to train a patient-specific automated classifier. The data was classified using a Knearest-neighbours algorithm with K=350 clusters or a Naïve Bayes classifier. Each classifier used an optimised subset of 8 features selected for the individual patient by a sequential feature selection method from a set of 21 extracted features. The trained classifier scored 24 h sections at a time. A generalised deep learning convolutional feed-forward neural network (CNN) algorithm tested and published in Nejedly et al. [21,23] was utilised to scan the data for artifactual segments. The input signal was processed by the generalised CNN model and the resulting artefact probability matrix was used to analyse and interpret the artifactual segments of the data. The sleep-wake scored data was then pruned by removing any artefactual epochs or epochs/days with more than 50% of data missing. Unusable epochs/days were classified as ‘unknown’. 2.3. Feature extraction We used a subset of algorithms previously defined by Gerla et al. [24] to extract spectral, entropy-based and wavelet transform features. We used 21 features extracted for each epoch, for each patient. Features included mean dominant and spectral median frequencies, mean absolute and mean relative spectral powers in the following frequency bands: 13 Hz (delta), 37 Hz (theta), 712 Hz (alpha), 1215 Hz (low beta), and 1520 Hz (high beta). As well as a spectral entropy feature, which is an estimate of the probability density function for each epoch of EEG signal in the frequency bands described above and for an additional 125 Hz band. To overcome energy fluctuations in the data, individual features were normalised into scale given by 0.05 and 0.95 quantiles of each feature distribution. Classifiers were trained with normalised and unnormalised features and we selected the classifier that produced the best results for each patient. An example of the standard frequency band features together with a continuous wavelet scalogram and sleep scoring is shown in Fig. 1. 2.4. Statistical analysis All sleep-wake patterns and the influence of seizures on sleep duration and structure were analysed using repeated measures oneway ANOVA. Bounded data were arcsine transformed prior to ANOVA. We did not assume sphericity of the data and so a Greenhouse-Geisser correction was used for all repeated measures ANOVA. To be consistent with existing literature, the interaction between seizure risk and day-to-day variability in sleep duration and composition were analysed using mixed effects logistic regression models. A p-value of 0.05 or lower was considered statistically significant unless otherwise stated. Data analyses were conducted using MATLAB R2017a, ANOVA was conducted using Graphpad Prism 8.3 and logistic regression modelling was conducted using Stata 16.1. 2.5. Role of the funding source The funders had no role in study design, data collection, analysis, interpretation, or the writing of the report. The corresponding author had full access to the data and had the final responsibility for the decision to submit for publication. 3. Results 3.1. Overview of sleep and seizure timing A total of 4340 days of sleep-wake data were analysed across 10 patients (between 224 and 709 days per patient). As sleep was commonly interrupted by brief arousals, the main transitions into (“sleep onset”) and out of (“sleep offset”) sleep were manually labelled by Table 1. Patient demographics. Patient # (y) Age Sex Epileptogenic zone Recording duration (days) # of Seizures # Days analysed % unknown sleep-wake state in analysed data 1 26 Male Parietal-temporal 767¢4 151 348 20 2 44 Male Occipitoparietal 730¢1 32 607 9 6 62 Male Temporal 441¢3 71 382 1 8 48 Male Frontotemporal 558¢4 467 355 2 9 51 Female Occipitoparietal 394¢9 204 224 20 10 50 Female Frontotemporal 373¢3 545 318 2 11 53 Female Frontotemporal 721¢6 467 398 13 12 43 Male Temporal 729¢0 13 709 0.8 13 50 Male Temporal 746¢9 500 534 10 15 36 Male Temporal 465¢6 77 465 2 yPatient numbering is based on the original trial. 17 K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 3 visual inspection (Fig. 2A). Any sleep sections shorter than 2 h in duration were classed as naps. Previous reports by our group have described circadian and circaseptan patterns in seizure occurrence for this patient cohort [25].InFig. 2B we show the distributions of sleep onset, offset and seizure times across a 24 h period. Of note, for patients 8 and 10 the seizures cluster at the same times of day as the regular sleep onset and offset transitions. This suggests that the timing of sleep could play an important role in seizure precipitation, at least in some patients. We also explored the circaseptan period but did not observe any clear trends between seizure occurrence and sleep transition times (Supplementary Fig. 1). 3.2. Overview of sleep structure Proportions of time in each sleep-wake state are shown for each patient in Fig. 3A. The time spent in brief arousal from sleep was labelled as wake after sleep onset (WASO) and is included in the total sleep duration. Segments where sleep-wake scoring was not possible due to noise, artefacts, or data dropout are represented as ‘unknown’. Days that contained more than 30% unknown were excluded from all analyses. The average hours asleep for each patient ranged from 7.52 to 11.35 h per seizure-free day including naps (Fig. 3B). This is 0.21 to 4.04 h longer than the average sleep duration reported for Australian adults, 7.31 h [26]. The longer duration of time spent asleep in our cohort may be the result of frequent napping, with patients taking an average of 0.211.04 naps on seizure-free days and 0.321.34 naps on days that seizures occurred (Fig. 3C). In order to determine if the patients’sleep followed a typical architecture, sleep was divided into cycles. Cycle one was defined to begin at the first instance of REM sleep and continue until the next instance of REM sleep. Each subsequent cycle began at the last REM period and extended until the next, as illustrated in Fig. 4A. Only the first five cycles of sleep, excluding naps, on seizure-free days are included in these analyses. Throughout sleep, cycle duration decreased with each subsequent cycle (Fig. 4B). The time spent in NREM1 and REM sleep increased with each cycle while the time spent in NREM3 sleep decreased (Fig. 4C). The trends were consistent across patients and the overall structure of sleep followed trends similar to those observed in healthy individuals [27]. These results thus indicate our sleep scoring methods were effective. 3.3. The relationship between sleep-wake state and seizure occurrence and duration To explore how seizure characteristics related to current sleepwake state on seizure, we calculated the proportion, rate, and Fig. 1. Power in Band features with continuous wavelet scalogram.(A) Automated sleep scores and corresponding (B) EEG time series continuous wavelet scalogram and power (mV) in Berger bands; (C) delta (14 Hz), D) theta (47 Hz), E) alpha (812 Hz), and F) beta (1230 Hz). Here, we show a recording from patient 15 on day 19 into the study. 4K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 duration of seizures in each sleep-wake category. Two patients (8 & 15) experienced more seizures during the wake state while the remaining eight patients (1, 2, 6, 9, 10, 11, 12, & 13) had the majority of their seizures during sleep which includes periods of brief arousal (Fig. 5A). When we calculated the average daily rate of seizures per sleep stage, we found that for most patients seizures occurred most frequently in NREM1 sleep (patients 2, 9, 10, 11 & 15; Fig. 5B). Though the effect of sleep-wake category on the seizure rate was significant for five patients, post-hoc analyses revealed no consistent trends across the cohort (Supplementary Table 1). There was no significant effect of sleep-wake category on seizure duration (Fig. 5C; Supplementary Table 2). 3.4. The relation between seizure probability and the day-to-day variability in sleep duration and composition To assess the interaction between day-to-day deviations in sleep duration and quality and seizure probability, we used logistic Fig. 2. Sleep and seizure circadian cycles. (A) Sleep-wake scores with example sleep transitions (sleep onset and sleep offset) labelled by visual inspection and indicated by dotted vertical lines. Sections of sleep shorter than 2 h in duration were classified as naps. (B) Normalised polar histograms of sleep onset (blue), sleep offset (yellow) and seizure (red) times throughout a 24 h period. For each patient the total number of sleep transitions (onset or offset) is shown in black and the total number of seizures in red (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.). K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 5 regression with random subject-specific intercept. A separate model was used to assess the influence of total sleep duration and the relative proportion of each sleep-wake state, calculated within a 24 h period. For each patient, days were categorised into decreased, baseline, and increased sleep duration. Baseline sleep was defined as sleep durations falling within the interquartile range (25th percentile and 75th percentile). Durations below the 25th percentile and above the 75th percentile were classed as decreased and increased sleep duration, respectively. The same method was applied to the relative proportion of each sleep-wake state. The interquartile range for total sleep duration and the proportion of each sleep-wake state is shown in Figs. 6A and 7A. Days when a seizure occurred were excluded from these categories. Alteration of sleep duration or sleep-wake state proportion was assumed to play a role if a seizure occurred within 48 h after an increase or decrease in sleep duration or sleep-wake state proportion. Each patient contributed multiple days of observation into each model, therefore the random effect was the patient to take within subject correlation into account. The sleep categories Fig. 3. Sleep duration and composition overview. (A) The proportion of time spent in each sleep-wake state, (B) the average daily duration (h) spent asleep on seizure free days (night sleep + naps), and C) the average number of naps per seizure free and seizure days are shown for each patient. Error bars represent standard deviation. Fig. 4. Night sleep structure.(A) Example illustration of sleep cycles. The average (B) cycle duration (h) and (C) proportion of the cycle spent in each sleep stage is shown for each patient in colour with the population average represented by the bold black line. 6K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 (decreased, baseline, and increased) were the fixed effects. When age, sex and epileptogenic zone were included in our models we found no significant effect nor any significant confounding influence on the effects of sleep on seizure occurrence (Supplementary Table 3), the variables were therefore excluded from the models. 3.5. Sleep duration For all but one patient (pt 12), we found that sleeping for longer durations was correlated with a reduced seizure likelihood in the following 48 h (Fig. 6B). Of note, patient 12, who did not follow this trend, experienced the smallest number of seizures (n= 13). At the group level, our logistic regression model revealed that when patients slept longer than the 75th percentile there was a 27% reduction in the odds of a seizure in the following 48 h when compared to baseline (p<0¢009; Table 2). For our cohort, the 75th percentile equates to an average of 11¢2(§1¢3) h of sleep, which is 1¢66 (§0.52) h longer than their median sleep duration. Interestingly, sleeping less than the 25th percentile (8¢29 §0¢99 h), which is 1¢13 (§0¢48) h less than their median sleep duration, did not have any significant group effect on the odds of a seizure (p=0¢48; Table 2). However, using random intercepts modelling, the random effect contributed to the Fig. 5. Seizure rate and duration for each sleep-wake state.(A) The proportion of seizures occurring in each sleep-wake state are shown for each patient. The group average (B) hourly seizure rate (sz/h) and () seizure duration (min) is shown for each sleep-wake state. The open circles represent the average for each patient. Fig. 6. Seizure probability is reduced following a night of increased sleep duration. (A) The interquartile range of total sleep duration, calculated in 24 h periods and including both night sleep and naps, is shown for each patient. (B) The population average change in the probability of a seizure occurring in the 48 h after a night of decreased (#<25th percentile of total sleep duration) or increased (">75th percentile of total sleep duration) total sleep duration relative to baseline is represented by the hollow bars. The change in probability for individual patients is represented by filled circles. Red bars indicate significant group-level effects. Error bars represent standard deviation. (C) For each patient, the normalised probability of a seizure occurring in the 48 h after a night of decreased (#), baseline (-), or increased (") sleep duration is represented by the filled bars (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.). K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 7 overall model variance significantly, suggesting that subjects responded differently. For four patients (2, 8, 11, & 12), a reduction in total sleep duration was followed by an increased probability of seizure relative to baseline, while for the remaining six patients (1, 6, 9, 13, & 15), the opposite was true (Fig. 6B & C). The differences between means for baseline and more/less sleep and the 95% confidence intervals are depicted in Supplementary Fig. 2A as bootstrap sampling distributions. There were no consistent trends in the age, sex, epileptogenic zone or medication with regards to the interaction between sleep duration and seizure probability. 3.6. Sleep composition We anticipated that the odds of seizure might increase following poor-quality sleep, consisting of a higher WASO or NREM1 proportion or a lower NREM3 or REM proportion. However, this was not the case. Instead, any deviation in the proportion of REM sleep from baseline tended to increase the odds of a seizure. A reduced proportion of REM sleep, below the 25th percentile (0¢09 §0¢05) was followed by a 29% increase in the odds of a seizure compared to baseline while an increased proportion of REM sleep (p=0¢026), above the 75th percentile (0¢17 §0¢07) was followed by a 27% increase in the odds of a seizure (p=0¢035; Table 2). We also observed a lower seizure probability tended to follow a night of reduced NREM3 (p=0¢052). However, none of these trends were found to be significant after Bonferroni corrections were applied for multiple comparisons. In general, changes in each sleep type had variable effects across the group, as indicated by the spread of both positive and negative changes in seizure probability relative to baseline (Fig. 7B). The differences between means for baseline and more/less REM sleep and the 95% confidence intervals are depicted in Supplementary Fig. 2B as bootstrap sampling distributions. 3.7. Sleep duration and composition following seizure occurrence To characterise sleep duration and composition following a seizure, we divided the data into three categories: days (24 h periods) that were seizure free (control), days where seizures occurred while the patient was awake (wake sz), and days where seizures occurred during sleep (sleep sz). If a seizure occurred both while awake and asleep, the day was excluded from analysis. The total duration of sleep and the relative proportion of each sleep-wake state were compared across control, wake sz, and sleep sz categories. In general, we found that patients spent more time asleep following a seizure, Fig. 7. Seizure probability does not change with day-to-day variability in sleep composition. (A) The interquartile range for the proportion of each sleep-wake state, calculated in 24 h periods as a proportion of the total sleep duration, is shown for each patient. (B) The population average change in the probability of a seizure relative to baseline is shown for decreased and increased proportions of WASO, NREM1, NREM2, NREM3, and REM sleep by the hollow bars. Individual patient values are indicated by the filled circles. Red bars indicate significant group-level effects. Error bars represent standard deviation (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.). 8K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 Table 2. Population level logistic regression model results investigating the interaction between seizure risk and day-to-day variation in sleep duration and sleep composition. A separate model was used for sleep duration and each sleep category proportion. Sleep Duration/ Composition Change in sleep relative to baseline Risk of seizure Odds ratio relative to baseline (95% Confidence interval) p-value (Bonferroni corrected a= 0.025) Change in the risk of seizure relative to baseline Total Sleep Duration #0¢92 (0¢74, 1¢15) 0¢48  "0¢73 (0¢58, 0¢92) 0¢009 # Proportion WASO #1¢02 (0¢81, 1¢27) 0¢89  "0¢86 (0¢69, 1¢09) 0¢21  Proportion NREM1 #0¢91 (0¢73, 1¢14) 0¢43  "0¢98 (0¢78, 1¢22) 0¢83  Proportion NREM2 #1¢04 (0¢84, 1¢31) 0¢701  "1¢01 (0¢81, 1¢27) 0¢93  Proportion NREM3 #0¢79 (0¢63, 1¢001) 0¢052  "0¢92 (0¢73, 1¢15) 0¢46  Proportion REM #1¢29 (1¢03, 1¢63) 0¢026  "1¢27 (1¢02, 1¢58) 0¢035  Fig. 8. Sleep duration and composition is altered following a seizure.(A) For each patient, the average duration asleep (h) is illustrated for seizure free (Control), wakeful seizure (Wake Sz), and sleeping seizure (Sleep Sz) categories. (B) The average change in sleep duration (h) and (C) The average change in the proportion of time spent in each sleep-wake state is illustrated for the population (bar) and individual patients (filled circles). Red bars indicate significant group-level effects. Error bars represent standard deviation (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.). K.L. Dell et al. / EClinicalMedicine 37 (2021) 100934 9