Main

Memories undergo continuous refinement following learning, in a process referred to as memory consolidation in which sleep plays a critical role. Sleep immediately after learning benefits memories1 and memories can be disrupted by even a few hours of sleep loss3. Studies have highlighted the importance of the hippocampus for sleep-dependent memory consolidation. However, the mechanisms through which memories are impacted by sleep loss have yet to be understood. Hippocampal sharp-wave ripples (SWRs), which feature sharp waves in the dendrites of CA1 pyramidal cells coupled with ripple oscillations (150–250 Hz) near the cell bodies, are widely considered to play a critical role in sleep-dependent memory processes. SWRs are observed more frequently in sleep after memory tasks4. Disrupting activity during these oscillations impairs memory5,6, whereas enhancing them improves memory7.

A key characteristic of SWRs is that they are generated in the CA3 region of the hippocampus and then produce intense spiking activity throughout the hippocampal formation8 and beyond9,10,11. Such synchronized activity drives synaptic plasticity in the network connections associated with individual memories, enhancing their storage and recall12,13. In fact, both synaptic strengthening, by means of long-term potentiation14,15, and synaptic weakening, through depotentiation or long-term depression16,17, have been associated with SWRs. In particular, the spiking activity during SWRs can be highly patterned to reactivate and replay activities initially expressed during learning and behaviour in a temporally compressed manner akin to rapid rehearsal18. By generating such rehearsals, SWRs can strengthen and stabilize spatial representations in the hippocampus6,19 and broadcast this signal to cortical and subcortical brain regions8,9. Although reactivations and replays during SWRs are widely considered to play a key role in the memory consolidation process, nothing is known about how these events are impacted by sleep deprivation (SD).

Long-duration recordings during behaviour, sleep and sleep deprivation

We performed extracellular recordings using 128-channel high-density silicon probes implanted unilaterally and bilaterally in the CA1 region of the rat hippocampus (Methods) during behaviour and sleep. We tracked local field potentials (LFPs) and stable units putatively classified into 754 pyramidal neurons and 96 interneurons. Recordings were initiated approximately 3.5 h before the onset of the light cycle with about 2.5 h of rest and sleep in a home cage (PRE). Animals were then placed in linear maze environments of differing shapes (MAZE), which they had not previously explored, and were allowed to run for about 1 h for water reward. Following the maze, animals were returned to the home cage for POST sessions, which involved either natural (ad libitum) sleep and rest (non-sleep deprivation (NSD)) for 9 h or SD through gentle handling for 5 h followed by recovery sleep (RS) (Fig. 1a). We divided these periods into 2.5 h blocks (NS1–NS3 versus SD1–SD2 and RS) aligned to zeitgeber time = 0, the onset of the light cycle. We then compared RS to NS1, the first blocks of ad libitum sleep in each group, as well as SD2 versus NS2, to show the effects of prolonged wakefulness relative to ad libitum sleep. SD sessions (eight sessions from seven animals) and NSD sessions (eight sessions from seven animals) were carried out in pseudo-random order on different days spaced more than 24 h apart, in the same animals.

Fig. 1: SD yields more SWRs but with weaker power and higher frequency ripples.
figure 1

a, After PRE, animals were introduced to MAZE then allowed either undisturbed sleep (NS1–NS2) or 5 h of sleep deprivation (SD1–SD2) followed by recovery sleep (RS). b, Power spectral density in sample NSD (left) and SD (right) sessions with hypnogram (top) indicating brain state (active wake (AW), quiet wake (QW), REM and NREM sleep) and spectrogram (bottom; z-scored over all frequencies for the time periods shown) of CA1 cells LFP. c, Average power spectral densities across all NSD (black line with grey shading (s.e.m.); n = 8 sessions from 7 animals) and SD/RS sessions (red or blue line with corresponding shading (s.e.m.); n = 8 sessions from 7 animals). d, The rate of delta waves is lower during SD versus sleep but increases from SD1 to SD2 and RS (individual sessions superimposed with connected dots). e, Sample sleep (left) with a high spontaneous rate of SWRs with LFPs (two shanks in black) and unit rasters (arbitrary colour and sorting). The rate of SWRs (right) decreases with sleep but remains elevated during SD. f, Power spectral densities in the ripple frequency band for the sessions in b with moving average ripple frequency (black). Sample SWRs (16-channel traces, white) at different timepoints (arrow heads). g, Box plots showing population median and top/bottom quartiles (whiskers, 1.5× IQR), estimated using HB, indicate higher frequency ripples in SD (n = 157,964 ripples total from eight sessions) versus NSD (n = 143,681 ripples total from eight sessions), with a rebound in RS. Session means overlaid as connected dots. Rightmost panel highlights cross-group comparisons for the first block of sleep in each group (NS1 versus RS) and the second block of SD versus NSD. h,i, Same as g for sharp-wave amplitude (h) and ripple band power (i). All panels, two-sided within-group comparisons and one-sided cross-group comparisons; d,e, t-tests; gi, comparisons of bootstrapped means. NS, not significant; #P < 0.10, *P < 0.05, **P < 0.01, ***P < 0.001, with no corrections for multiple comparisons. See Supplementary Tables 1 and 2 for additional details. ZT, zeitgeber time.

Power spectral calculations (Fig. 1b,c) demonstrated strong delta (less than 4 Hz) power in the hippocampal LFP during non-rapid eye movement (NREM) sleep and strong theta (5–10 Hz) during rapid eye movement (REM) sleep (Extended Data Figs. 1 and 2a,b). We saw evidence for neither prominent delta during SD nor prominent theta outside REM periods20. However, the rate of isolated delta waves (Fig. 1d) increased throughout the SD period, indicative of microsleep or local sleep21,22 (see Extended Data Fig. 2c for detected OFF states). Overall, SD was characterized by lower spectral power across frequencies (Fig. 1c). RS following SD subsequently featured a robust rebound in delta activity (Fig. 1c,d and Extended Data Figs. 1 and 2c), consistent with sleep homeostasis23,24.

A higher rate of SWR during SD

Previous studies have suggested that the incidence rate of ripples and associated population burst events play important homeostatic roles in hippocampal dynamics16,17,25. We therefore asked how the rate of these events changes during sleep compared to a similar period during extended wakefulness (Fig. 1e). In naturally sleeping animals, we found that the incidence rate of SWRs decreased over time, consistent with a homeostatic effect from sleep (NS1 median = 0.57 Hz (interquartile range (IQR) = 0.06 Hz) versus NS2 median = 0.46 Hz (IQR = 0.03 Hz), P = 1.86 × 10−3, paired t-test (d.f. = 7)). By contrast, the rate of SWRs remained high in animals during SD (SD1 median = 0.5 Hz (IQR = 0.16) versus SD2 median = 0.57 Hz (IQR = 0.03), P = 0.73, paired t-test (d.f. = 7)) and was higher during the second block (zeitgeber time = 2.5–5 h) of SD compared to NSD (SD2 versus NS2, P = 1.08 × 10−3, t-test (d.f.1 = 7 and d.f.2 = 7); Extended Data Fig. 2d,e). Once the SD animals were allowed to sleep (at zeitgeber time = 5 h), the rate of ripples dropped to levels lower than those in the early block of ad libitum sleep (RS median = 0.45 Hz (IQR = 0.19) versus NS1 median = 0.57 Hz (IQR = 0.06), P = 7.87 × 10−3, t-test (d.f.1 = 7, and d.f.2 = 7)). In both NSD and SD, this ripple rate was consistently modulated by delta waves and the probability of an OFF state following a ripple increased over the course of SD (Extended Data Fig. 2f–j), as expected11. Overall, the number of SWRs was not negatively affected but was higher during SD compared to natural sleep.

Sleep loss alters the physiological properties of SWR

Given the prevalence of SWRs during both sleep and sleep deprivation, we proposed that other characteristics of these hippocampal events might differ across these periods (Fig. 1f). The peak frequency of ripples in our recordings (Fig. 1g) decreased over the course of sleep (NS1 mean = 165.32 Hz (IQR = 1.75) versus NS3 mean = 154.37 Hz (IQR = 2.93), P < 2 ×10−4 (hierarchical bootstrap (HB) based on 104 random samples with replacement across data levels26). However, during SD, ripple frequency remained elevated (SD2 mean = 170.13 Hz (IQR = 1.18) versus SD1 mean = 171.55 Hz (IQR = 1.58), P = 0.14, HB) and was significantly higher compared to ad libitum sleep, (SD2 mean versus NS2 mean = 154.87 Hz (IQR = 1.24), P < 10−8, HB). The high frequency of ripples during SD (but not NSD) was also higher than those seen during MAZE (P = 0.0204, HB) or PRE sleep (P < 10−4). Although changes in ripple frequency of the order of several Hz may be expected on the basis of temperature differences across sleep and awake27, we observed larger differences of up to about 15 Hz (for example, SD2 versus NS2); these differences remained significant when accounting for state dependence (Extended Data Fig. 2k). After RS, ripple frequency dropped rapidly to levels lower than during the similar sleep period in NSD (RS mean = 155.40 Hz (IQR = 1.74) versus NS1 mean = 165.32 Hz (IQR = 1.75), P = 3.54 × 10−6, HB).

The sharp waves concurrent with ripples reflect synchronized Schaffer collateral input from CA3 converging on the apical dendrites of CA1 neurons. We measured changes in the amplitude of sharp waves using the difference between the most negative and most positive deflections (typically in stratum radiatum and stratum oriens, respectively) recorded on our CA1-spanning electrodes. In POST, we found increased amplitudes of sharp waves compared to MAZE in both NSD (NS1 mean = 5.36 mV (IQR = 0.65) versus MAZE mean = 4.33 mV (IQR = 0.67), P < 2 × 10−4, HB) and SD groups (SD1 mean = 4.62 mV (IQR = 0.53) versus MAZE mean = 4.00 mV (IQR = 0.67), P = 1.40 × 10−3, HB). These amplitudes were also larger than those observed during PRE for NSD (NS1 versus NSD PRE mean = 4.63 mV (IQR = 0.71), P = 3 × 10−4, HB) although not for SD (SD1 versus SD PRE mean = 4.45 mV (IQR = 0.57), P = 0.13, HB), including when accounting for state dependence (Extended Data Fig. 2k). Sharp-wave amplitudes did not change further over the course of NSD or SD (Fig. 1h) but RS elicited a strong increase in sharp-wave amplitudes (RS mean = 5.32 mV (IQR = 0.69) versus SD2 mean = 4.59 mV (IQR = 0.51), P < 2 × 10−4, HB). The power of ripples (100–250 Hz, z-scored over each entire session Fig. 1i) during SWRs varied similarly to sharp-wave amplitude, suggesting that higher amplitude sharp waves in the stratum radiatum produce stronger ripples in the pyramidal layer. These increased in POST relative to MAZE (NS1 mean = 5.88 mV (IQR = 0.51) versus MAZE mean = 4.39 mV (IQR = 0.56), P < 10−4, HB and SD1 mean = 4.64 (IQR = 0.50) versus MAZE mean = 4.06 mV (IQR = 0.39), P = 1.8 × 10−3, HB) and relative to PRE for NSD (NS1 mean = 5.88 mV (IQR = 0.50) versus PRE mean = 5.11 mV (IQR = 0.60), P < 2 × 10−4, HB) but not for SD (SD1 mean = 4.64 mV (IQR = 0.50) versus PRE mean = 4.72 mV (IQR = 0.59), P = 0.65, HB) (Extended Data Fig. 2k). Ripple power (z-scored over the session) then decreased over the course of sleep (NS3 mean = 5.57 (IQR = 0.44) versus NS1 mean = 5.88 (IQR = 0.50), P = 1.8 × 10−2, HB) but increased over SD (SD2 mean = 4.97 (IQR 0.50) versus SD1 mean = 4.64 (IQR = 0.50), P < 2 × 10−4, HB) and even further after RS (RS mean = 5.67 (IQR = 0.59), P < 2 × 10−4, HB). Although these measures showed high variability across subjects, cross-group comparisons (NS2 mean versus SD2 mean) were significant for ripple power (P = 0.040) and demonstrated a trend for sharp-wave amplitude (P = 0.090). Overall, these results demonstrate that, although the total number of ripples remains elevated during SD, sleep loss manifests with higher frequency ripples but at lower power and with smaller sharp waves, potentially reflecting the physiological impact of fatigue on the pyramidal cell–interneuron interactions that give rise to these events28.

Sleep loss disturbs firing-rate dynamics in the hippocampal network

The firing rates of neurons are sensitive to changes in sleep states29, serve as important signals of the homeostatic function of sleep25,30 and can reflect the strength of synaptic connectivity among neurons17,30. We therefore assessed the effects of sleep and sleep loss on hippocampal firing-rate dynamics (Fig. 2). During active exploration of the maze, firing rates tended to increase from PRE for pyramidal cells (NSD in which MAZE mean = 1.15 Hz (IQR = 0.14) versus PRE mean =  0.94 Hz (IQR = 0.14), P = 0.0028, HB; but not significantly for SD in which MAZE mean = 1.11 Hz (IQR = 0.26) versus PRE mean = 0.95 Hz (IQR = 0.21), P = 0.128, HB) and for interneurons (a trend for NSD with MAZE mean = 23.35 Hz (IQR = 4.30) versus PRE mean = 20.34 Hz (IQR = 5.23), P = 0.055, HB; and significantly for SD with MAZE mean = 21.96 Hz (IQR = 3.88) versus PRE mean = 18.72 Hz (IQR = 4.12), P = 0.044, HB). However, following MAZE, sleep loss produced different dynamics from natural sleep. Pyramidal cell firing rates (Fig. 2a,b) dropped significantly within hours of natural sleep (NS1 mean = 0.90 Hz (IQR = 0.12) versus MAZE, P = 0.028, HB) and further over the course of NSD (NS2 mean = 0.80 Hz (IQR = 0.09) versus NS1, P = 2.8 × 10−3, HB) but they remained elevated throughout the 5 h SD period (SD2 mean = 1.04 Hz (IQR = 0.23) versus SD1 mean = 1.01 Hz (IQR = 0.20), P = 0.55, HB). Differences were also evident in the distributions of pyramidal cell firing rates; these were skewed during PRE and MAZE, subsequently became log-normal in sleep29,31 but remained skewed in SD (NS2 mean IQR = 0.63 log(Hz), P = 0.24, versus SD2 mean IQR = 0.81 log(Hz), P = 2.7 × 10−3, HB of Shapiro–Wilk test, Fig. 2d), with a broader distribution (Fig. 2e). These broad and negatively skewed distributions indicate that during prolonged awake SD a few cells fire at elevated rates whereas other reduce firing, suggestive of competition among neurons mediated by inhibition29. Consistent with this, interneuron firing rates (Fig. 2c) decreased with the onset of natural sleep and remained so throughout sleep (NS1 mean = 17.91 Hz (IQR = 3.37) versus MAZE mean = 23.35 Hz (IQR = 4.30), P = 4 × 10−4, HB; NS3 mean = 16.86 Hz (IQR = 3.02) versus NS1, P = 0.21, HB) but, in contrast, remained elevated from MAZE to SD (SD1 mean = 20.28 Hz (IQR = 5.32) versus MAZE mean = 21.96 Hz (IQR = 3.88), P = 0.34, HB) and the remainder of SD (SD2 mean = 20.03 Hz (IQR = 5.01) versus SD1, P = 0.66, HB). With the onset of RS, firing rates decreased rapidly for pyramidal cells (RS mean = 0.72 Hz (IQR = 0.19) versus SD2 mean = 1.04 Hz (IQR = 0.22), P < 2 × 10−4, HB) and interneurons (RS mean = 13.02 Hz (IQR = 3.41) versus SD2 mean = 20.03 (IQR = 5.01), P < 2 × 10−4, HB). Owing to large variability, cross-group comparisons were less salient but demonstrated a trend towards higher firing rates in pyramidal cells in the second block of SD compared to NSD (NS2 mean = 0.80 Hz (IQR = 0.09) versus SD2 mean = 1.04 Hz (IQR = 0.22) P = 0.074). Interneurons likewise trended towards lower firing rates in natural sleep compared to RS (NS1 mean = 17.91 Hz (IQR = 3.37) versus RS mean = 13.03 Hz (IQR = 3.47), P = 0.090, HB). Although these patterns were largely attributable to state-dependent effects of waking and NREM (Extended Data Fig. 3), overall, the increased firing rates and skewed distributions in SD compared to ad libitum natural sleep indicate a higher metabolic impact of prolonged waking on hippocampal activities, which confirm and extend previous observations25,29.

Fig. 2: Hippocampal firing rates are elevated and more dispersed during SD.
figure 2

a, Example sessions from NSD (top) and SD (bottom) with RS, showing firing rates of pyramidal units (5 min bins, units sorted by mean) and hypnograms (top: AW, QW, REM and NREM sleep) during POST. Mean firing rate (right axis) superimposed (white, this session; black, across all sessions). b, Pyramidal neurons (PNs) during NSD (black, left; n = 442 cells from eight sessions) and SD/RS (red/blue, right; n = 312 cells from eight sessions) in (PRE, MAZE, ZT 0–2.5, ZT 2.5–5 and ZT 5–7.5) show decreasing firing during sleep but elevated firing during SD. Individual session means superimposed (connected dots). c, Same as b but for interneurons (IN) (n = 48 cells from eight NSD sessions and n = 48 cells from eight SD sessions). d, The full distribution of PN firing rates deviates from log-normal during SD1 and SD2 but not NS1 or NS2. e, log firing rate IQR shows greater variance for PNs in SD versus NSD. f, PN firing rates specifically in ripples decreased over sleep and remained stable during SD but with minimal cross-group differences. g, IN firing during ripples decreased over sleep but remained elevated during SD then dropped in RS, with significant differences between NS1 and RS. All box plots depict median and top and bottom quartiles (whiskers, 1.5× IQR) of the HB data. b,c,eg, two-sided within-group comparisons and one-sided cross-group comparisons of HB means. d, Shapiro–Wilk tests performed on each HB log distribution, with P obtained from the proportion with significant skew; one-sided cross-group comparisons performed on the HB Shapiro–Wilk test statistics. #P < 0.10, *P < 0.05, **P < 0.01, ***P < 0.001, with no corrections for multiple comparisons. See Supplementary Table 1 for additional details.

Interneurons of different types have a variety of firing response during SWRs and play an important role in determining the physiological characteristics of the ripple oscillation. Therefore, we also examined the firing responses of interneurons, alongside those of pyramidal cells, specifically in SWRs (Fig. 2f,g). Although firing rates in ripples varied across the periods we examined, we generally saw little difference between natural sleep and SD (pyramidal neurons having NS2 mean = 3.44 Hz (IQR = 1.03) versus SD2 mean = 3.71 Hz (IQR = 1.24), P = 0.41, HB; interneurons having NS2 mean = 45.16 Hz (IQR = 7.36) versus SD2 mean = 37.38 Hz (IQR = 6.61), P = 0.16, HB). However, we observed a significant decrease in the ripple firing rates of interneurons during RS compared to the similar period in natural sleep (RS mean = 34.11 Hz (IQR = 7.11) versus NS1 mean = 49.37 Hz (IQR = 7.85), P = 0.033, HB). Somatostatin-positive interneurons, a subset of which are lacunosum moleculare-projecting interneurons which gate entorhinal cortical input to CA1 (ref. 32), generally fire at lower rates during SWRs than do other cells33. The lowered firing rates we observe during RS may therefore reflect the differential impact of sleep loss specifically on this class of interneurons, consistent with a recent study using immediate early genes34.

Sleep loss attenuates memory reactivation

Given that our results thus far demonstrate a high rate of SWRs during SD with robust concurrent firing in pyramidal cells, we next asked whether the specific content of SWRs may be impacted by SD. We first examined the reactivation of neuronal ensembles, which have been linked to the memory function of the hippocampus2,18. Such reactivations can persist for hours after a new experience35 and can broadcast the hippocampal signal to cortical regions2,8,9. To quantify reactivation, we calculated the partial correlation explained variance (EV) (Methods), which measures the similarity of pairwise correlations between MAZE and POST while controlling for pre-existing correlations in PRE36 in 250 ms bins in sliding 15 min windows (5 min steps; Fig. 3a). A time-reversed explained variance (REV) was used to estimate the chance level for reactivation37. In naturally sleeping animals following exposure to the new maze we observed hours-long reactivation, consistent with our previous study35. During SD, however, we observed one of two scenarios: either virtually no reactivation (for example, rats N and U, Fig. 3a; seen in four of seven sessions, Extended Data Fig. 4) or reactivation similar to NSD but with a faster rate of decay (for example, rats S and V, Fig. 3a; seen in three of seven sessions, Extended Data Fig. 4). These differences were not caused by discrepancies in the amount of time or the distance covered on the MAZE or in the proportion of active versus quiet wake states in the home cage (Extended Data Fig. 5a–c). However, we observed a significant negative correlation (r = −0.9, P = 0.006, Pearson correlation coefficient) between the rate of delta waves during SD2 (Extended Data Fig. 5d but not during other periods) and the amount of reactivation (EV) during SD1. Given that delta waves represent accumulated sleep pressure21,38, this indicates that variations in sleepiness or resilience to sleep loss could potentially explain the differences in the capacity for hippocampal reactivation in sleep-deprived animals39.

Fig. 3: Reactivation attenuates during SD and is not restored by RS.
figure 3

a, EV of pairwise reactivation (NSD, black; SD, red) and its chance levels (REV, yellow (maize)) during POST in ad libitum sleep (NSD; left column) and SD with RS (right column) sessions from four animals (sex on y axis; hypnogram on top (AW, QW, REM and NREM sleep); additional sessions in Extended Data Fig. 4). Solid line shows mean EV/REV and shaded regions indicate low standard deviations. NSD sessions featured robust reactivation lasting for hours, whereas SD sessions showed either some (rats S and V) or little reactivation (rats N and U). b, Proportion of time spent in WAKE during NSD and SD (top left) and in NREM during NSD and RS (top left). When calculated exclusively during WAKE (bottom left), mean EV (mean and s.d. are shown by solid line and shading, respectively) shows a similar decrease in both NSD (n = 20,544 cell pairs from six sessions) and SD (n = 8,114 cell pairs from seven sessions), but when calculated exclusively during NREM (bottom right), there is lower reactivation in RS than in NSD. c, The decay constant obtained from exponential fits to EV curves separated by brain state (individual sessions overlaid with connected dots, except for out of range). In NSD, EV decays more slowly during NREM versus WAKE. The WAKE EV decays more slowly in SD compared to NSD but trends towards faster decay than during NSD NREM. d, EV plots indicate lower reactivation during SD versus NSD, with a rebound during RS to lower levels than in ad libitum sleep. All box plots depict median and top and bottom quartiles (whiskers, 1.5× IQR) of HB data. Two-sided within-group comparisons and one-sided cross-group comparisons of bootstrapped means, #P < 0.1, *P < 0.05, **P < 0.01, ***P < 0.001, with no corrections for multiple comparisons. See Supplementary Table 1 for additional details.

Overall, when we compared EV calculated exclusively during the awake state (Fig. 3b, left), we found similarly low levels of reactivation which decreased over time in both NSD and SD, in contrast to the higher reactivation during sleep exclusively in NSD (Fig. 3b, right). Across subjects, the time constant of decay, estimated from an exponential fit to EV, was significantly larger in NREM compared to waking NSD (Fig. 3c) and also larger in waking SD than in waking NSD, suggestive of compensation for the lack of sleep in the former group. Reactivation levels were significantly lower during SD (Fig. 3d) when comparing SD1 with NS1 as well as comparing SD2 with NS2. Thus, compared to sleep, the awake state demonstrated a more limited capacity for reactivation. Prolonged waking, in particular, provided a lower level of reactivation when compared to ad libitum sleep during the same period. However, although reactivation was nearly absent by the end of SD, it increased significantly with the onset of RS (Fig. 3a,d). This suggests that the hippocampus is capable of reprising ensemble patterns reactivation even after a pause, such as during SD. But critically, even with this compensatory increase, reactivation levels during RS were substantially reduced compared to a corresponding period from NSD (Fig. 3b,d; see also comparisons for 1 h blocks in Extended Data Fig. 6). This reveals a persisting consequence of SD that, unlike other effects of sleep loss, is not restored even after lost sleep is reclaimed.

Sequence replay deteriorates during SD and RS

Whereas pairwise measures, such as EV, measure neuronal reactivation, finer scale analysis has revealed that neuronal activity during SWRs can also provide a temporally compressed replay of sequences of place cells which fired during maze behaviour2,18. Although most studies of replay have been directed at rest and sleep within an hour of maze exposure, we took advantage of our long-duration recordings to investigate how replay (Fig. 4a) unfolds over several hours of sleep compared with SD. As quantification of these events relies on different assumptions about the nature of replay40,41, we focused on using Bayesian methods (Fig. 4b) to simply quantify the proportion of ripple events that decode continuous movement through the maze (trajectory replays). Ripple events featuring five or more active units during animal movement speeds of less than 8 cm s−1 and peak ripple power of more than 1 s.d. were considered candidates for further analyses (Methods). We assessed trajectory structure using the distance between decoded locations in adjacent time steps, referred to as ‘jump distance’42; ripple events with jump distance less than 40 cm in at least three consecutive time bins, were classified as trajectory replays.

Fig. 4: Trajectory replays deteriorate over SD and RS.
figure 4

a, Hippocampal spike raster (arbitrary colours ordered by place field location) and raw (black) and ripple-filtered (blue) local field (LFP) during a sample run (normalized track position overlaid in orange). Grey box (right) shows a sample sleep replay. b, Sample trajectory replays for NSD and SD from top 10 percentile of distance covered and lowest 10 percentile of mean jump distance (value in lower left of each box gives the normalized distance) in each epoch. Replays were observed in all epochs but became progressively shorter, particularly in SD, with fewer events meeting the replay criteria. c, Fewer events qualified as replays by the second block of SD (of n = 72,584 candidate events from seven sessions) and in RS compared to NSD (of n = 64,205 candidate events from six sessions). Critically, the proportion of replays in RS was significantly lower than in the equivalent period from ad libitum sleep (NS1). d, Similar to c but for the rate of replays. Fewer replays were seen in the first block of SD compared to NSD and there were fewer replays in RS versus NS1. e, The durations of trajectory replays were significantly reduced from the first to second block of SD (n = 15,005 replays from seven sessions) but not NSD (n = 17,742 replays from six sessions), with a further decrease after RS. All box plots depict median and top and bottom quartiles (whiskers, 1.5× IQR) of the HB data with individual session means overlaid and connected. Two-sided within-group comparisons and one-sided cross-group comparisons of bootstrapped means; #P < 0.1, *P < 0.05, **P < 0.01, ***P < 0.001, with no corrections for multiple comparisons. See Supplementary Table 1 for additional details.

We observed that the proportion of ripples qualifying as trajectory replays was highest on the maze in both experimental groups and was also higher in ad libitum sleep in NS1 compared to PRE (Extended Data Fig. 7), consistent with previous reports43,44. However, the proportion of trajectory replays significantly decreased over the course of SD (SD1 mean = 0.21 (IQR = 0.034) versus SD2 mean = 0.018 (IQR = 0.028), P = 0.024, HB) and was significantly lower from natural ad libitum sleep by the second block of SD (NS2 mean ± s.e.m. = 0.26 (IQR = 0.017) versus SD2 mean = 0.018 (IQR = 0.18), P = 4.02 × 10−4). Even during RS, replays decreased further and did not rebound to the comparative levels in NSD (Fig. 4c; RS mean = 0.016 (IQR = 0.023) versus NS1 mean = 0.027 (IQR = 0.034), P = 1.98 × 10−4, HB). The total rate of trajectory replays (Fig. 4d) was also lower in the first block of SD compared to NSD (SD1 mean = 590 (IQR = 84) versus NS1 mean = 840 (IQR = 128), P = 0.014, HB) and remained significantly lower in RS (RS mean = 290 (IQR = 64) versus NS1 mean = 840 (IQR = 128), P < 10−4, HB). Although the patterns in the effects of SD/RS versus NSD on trajectory replays somewhat differ from those for reactivation, some discrepancies are expected because of the methodological differences in the measures used for these patterns41. Further differences could also arise if pairwise co-activations during sleep reflect the maze experience without integrating into neural sequences that correspond to paths with momentum through the maze environment45,46,47.

Finally, motivated by a recent study that reported a memory benefit for longer replays7, we measured and compared the durations of trajectory replays (Fig. 4e). Although we did not detect significant cross-group differences in replay durations, within SD (but not NSD) we observed a significant decrease from the first to the second block (SD1 mean 0.203 s (IQR = 0.0097 s) versus SD2 mean = 0.186 s (IQR = 0.013 s), P < 2 × 10−4, HB) and a further decrease in RS (SD2 mean = 0.186 s (IQR = 0.013 s) versus RS mean = 0.172 s (IQR = 0.014 s), P = 0.012, HB). Overall, these results demonstrate that the loss of sleep immediately following a new experience diminishes the hippocampal replay of place cell patterns following new maze exposure and that this impairment persists even when sleep is regained.

Discussion

During sleep deprivation compared to natural sleep, we observed lower amplitude sharp waves coupled with lower power ripples and higher frequency ripple oscillations at the CA1 pyramidal layer. Higher amplitude and power generally indicate greater synchrony of CA3 inputs to CA1 neurons, leading to greater spiking in CA1 neurons2,48 and stronger resonance throughout the hippocampal formation8, although the animals’ sleep/awake states were not separated in most of these studies. Nevertheless, one recent study reported that SWRs during waking, for which we observe lower power ripples, have a larger impact on prefrontal cortical neurons49 than they do during sleep. Similarly, another study reported that lower amplitude sharp waves produced larger neuronal responses in extra-hippocampal regions8. These observations suggest that larger sharp waves do not necessarily translate to greater activation in target regions. Additionally, hippocampal firing rates during SWRs remained comparable between sleep-deprived and sleeping animals despite differences in SWR features, indicating that SWRs of different power and amplitude can generate similar responses in hippocampal neurons.

The increase in ripple power over SD but decrease in power over sleep, with parallel changes in ripple frequency, suggest that these SWR features can serve as indicators of sleep pressure. These indicators are measurable from the hippocampal LFP in both waking and sleep, in contrast to cortical slow-wave activity used in common models of sleep homeostasis24, which can only be measured during sleep (see also ref. 23). Higher frequency ripples potentially reflect the higher metabolism of the awake state50 which is progressively lowered and reset in sleep25. However, differences in ripple frequency can also reflect differential neuromodulatory tone, such as activation of GABA-A51 or 5-HT receptors52, or different routing of inputs to CA1, with higher frequency ripples reflecting the influence of CA2 during waking53 and lower frequency ripples reflecting input from the entorhinal cortex2,54. Consistent with this notion, we noted an increase in ripple frequency, coupled with higher power and higher amplitude sharp waves, following the new maze exposure, particularly in the awake state (Extended Data Fig. 2k; see also ref. 55). Lower frequency ripples have also been associated with aging56, whereas ripple frequency increases after learning57, consistent with the postulated correlation with higher metabolic cost.

In addition to differences in physiological features of SWRs, we reported firing-rate patterns that seem generally consistent with the ‘synaptic homeostasis hypothesis’25,50, which conjectures that waking drives strengthened connectivity between neurons, whereas sleep drives synaptic downscaling. The decrease in reactivation and replay over the course of sleep may likewise be consistent with this hypothesis as the pathways providing reverberation of waking patterns are progressively reduced. On the other hand, the more rapid decline in replay and reactivation during SD versus sleep is not readily reconciled with a privileged role for waking in synaptic strengthening. If synaptic strengthening indeed occurs preferentially during the awake state, then it could be expected to elicit more robust reactivation than during sleep. Another possibility, however, is that the strengthening during awake activity is promiscuous rather than specific to the firing patterns evidenced on the maze. In this scenario, waking during SD may actively interfere with hippocampal reactivation by provoking the hippocampus to generate and learn new patterns inconsistent with the maze experience. Similarly, whereas it has been conjectured that SWRs may serve to downscale synapses17,25,50, reactivation and replay were longer lasting during sleep, even though SD featured a higher incidence rate of SWRs, potentially indicating a homeostatic drive58. The background brain states against which SWRs occur, along with the specific hippocampal firing patterns that they produce, probably play an important role in determining their effects on the hippocampal circuit and other brain regions6,8,17,49.

Notably, in this study we found reactivation during natural sleep that lasted for hours35 but diminished reactivation during SD with only limited rebound when animals eventually regained lost sleep. The absence of a more complete rebound was remarkable because although most indices of brain health and function, including protein signalling59 and gene transcription60, return to normal levels following sufficient RS, memories compromised by sleep loss typically do not recover3,59,60. Overall, our work calls attention to reactivation and replay, rather than simply the occurrence of SWRs, as potentially the crucial elements that mediate the role of sleep in memory and the negative impact of sleep loss. The disruption of these neuronal firing patterns could destabilize hippocampal spatial representations19,47 and hippocampus-dependent spatial memories6. Furthermore, as SWRs provide privileged windows of communication between the hippocampus and other brain regions11, the compromised nature of this exchange is likely to have repercussions on networks distributed throughout the brain8,9.

Methods

Animals and surgical procedures

Four male and three female Long-Evans rats (300–500 g, 10–15 weeks old) were used in this study. No sample size calculations were performed. The sample size was selected to adequately reflect the variability in reactivation during sleep deprivation. As one animal had a low number of stable units, an additional male rat was added. All surgeries were performed on isoflurane anaesthetized animals head fixed on a stereotaxic frame61. After removing hair from the head, the incision area was cleaned using alcohol and betadine. Next, an incision was made to expose the skull underneath. The skull was cleaned of tissues and blood, after which hydrogen peroxide was applied. Coordinates for probe implantation were marked above the dorsal hippocampus (anteroposterior, −3.36; mediolateral, ±2.2) following measurement of bregma and lambda. Craniotomies were drilled at the marked location. Using a blunt needle, the dura was removed carefully to expose the brain surface. After cessation of bleeding, animals were implanted with 64-channel silicon probes (eight shanks Buzsaki; Neuronexus; one animal) or 128-channel silicon probes (eight shanks; Diagnostic Biochips; six animals). Ground and reference screws were placed over the cerebellum. Craniotomy was covered with DOWSIL silicone gel (3–4680, Dow Corning) and wax. A copper mesh was built around the implant for protection and electrical shielding. All procedures involving animals were approved by the Animal Care and Use Committee at the University of Michigan.

Behaviour

Before the probe implant surgery, animals were habituated to the experimenter for 40 min or more over 5 days. Following habituation, animals were water restricted and trained to associate water rewards with plastic wells. During the post-implant recovery period (7 days) animals were brought to the recording room for monitoring electrophysiology signals and probes were slowly lowered to the dorsal CA1 region of the hippocampus. In addition, animals were also habituated to sleep box for more than 1 h every day. Following this, animals were placed on a water restriction regiment for 24 h before experiments started. Each experimental session began by transferring animals to their sleep box about 4 h before the onset of light cycle. After 3 h of recording in the home cage, animals were transferred to a maze that they had not previously explored. These maze tracks were made distinct by the shape, colour and construction materials. Animals alternated for about 1 h between two water wells fixed at either end of the maze to retrieve rewards from water wells. Following exploration, animals were transferred to the home cage and the recording continued for 10 h or more in either SD or NSD, pseudo-randomly assigned. Owing to the unmistakable differences in the data across these groups, experimenters were not blinded to experimental conditions. Animals had access to ad libitum food and received ad libitum water for 30 min per day.

Sleep deprivation protocol

SD was performed at the onset of the light cycle in the home cage using a standard ‘gentle handling’ procedure62,63. Animals were extensively habituated to the experimenter conducting the SD. During the initial hours of SD, animals were kept awake by mild noises, tapping or gentle shaking of the cage when they showed signs of sleepiness. As sleep pressure built up over a 5 h SD period, other techniques such as gently stroking the animal’s body with a soft brush or disturbing bedding were increasingly used to ensure that they stayed awake. Following SD, animals were allowed to sleep and recover for 48 h before any further experiments.

Data acquisition

Electrophysiology data were acquired using OpenEphys64 or an Intan RHD recording controller sampled at 30 kHz. Analysis of LFP was performed on signals downsampled to 1,250 Hz. The animal’s position on the maze track was obtained using Optritrack (NaturalPoint) hardware and Motive software (v.2.0, https://optitrack.com/software/motive/), which uses infrared cameras to locate markers clipped to the animal’s crown. Three-dimensional position data were sampled at 60 or 120 Hz and later interpolated for aligning with electrophysiology. Water rewards during alternation on the maze track were delivered by means of solenoids interfaced with custom-built hardware using Arduino. The timestamps for water delivery were recorded by means of transistor–transistor logic pulses.

Spike sorting, cell classification and stability criteria

Raw data went through filtering, thresholding and automatic spike sorting using SpyKING CIRCUS (v.0.8.8–v,1.1.0, https://github.com/spyking-circus/spyking-circus)65, followed by manual inspection and reclustering using the Phy package (v.2.0, https://github.com/cortex-lab/phy/). Only well-isolated units were used for further analysis with the exception of decoding/sequence detection analysis in which we used all clusters that satisfied the stability criteria.

LFP and unit analyses were performed using custom codes (NeuroPy) written in Python and are available in our laboratory’s GitHub repository (v.0.1, https://github.com/diba-lab/NeuroPy) which uses the packages NumPy (v.1.24.4, https://numpy.org), SciPy (v.1.11.3, https://scipy.org) and pingouin (v.0.5.3, https://pingouin-stats.org) for data analysis and matplotlib (v.3.8.1, https://matplotlib.org) and Seaborn (v.0.11.2, https://seaborn.pydata.org) for visualization. Units were sorted into putative pyramidal cells and interneurons on the basis of peak waveform shape, firing rate and interspike interval66,67.

With respect to stability criteria, to ensure that a given neuron was reliably tracked across the recording duration, we divided each session into five equally sized bins (about 2.5 h) and excluded any unit that fired below 25% of its overall mean in any given time bin.

Sharp-wave ripple detection and related properties

For detecting ripples, one channel from each shank was selected on the basis of the (highest) mean power in the ripple frequency band (125–250 Hz). The Hilbert amplitude was averaged across all selected channels, then smoothed using a Gaussian kernel (σ= 12.5 ms) and z-scored. Putative ripple epochs were identified from timepoints exceeding 2.5 s.d. and the start/stop was associated with signals of more than 0.5 s.d.; candidate ripples of more than 50 ms or more than 450 ms were excluded from further analyses. The maximum z-score value in a ripple epoch was termed as its ripple power. Sharp-wave amplitudes were obtained from a bandpass (2–30 Hz) filtered LFP using the difference between maximum and minimum value across all recorded channels in a given ripple. The peak frequency of each ripple was estimated using a complex wavelet transform. The LFP was first high-pass filtered at more than 100 Hz. This filtered signal was then convolved with complex Morlet wavelets with central frequencies selected from linearly spaced frequencies in the ripple frequency band (100–250 Hz). In each ripple, the frequency with maximum absolute wavelet power was designated as the peak ripple frequency.

Sleep scoring

Sleep scoring was performed using correlation electromyogram (EMG), theta and delta power. Correlation EMG was estimated by summing pairwise correlations across all channels calculated in 10 s time windows with a 1 s step68,69. For theta power, a recording channel with the highest mean power in the 5–10 Hz theta frequency band was identified. Following theta channel selection, the power spectral density was calculated for each window. Periods with low and high EMG power were labelled as sleep and wake, respectively. The theta (5–10 Hz) over delta (1–4 Hz) plus (10–14 Hz) band ratio of the power spectral density was used to detect transitions between high theta and low theta, using custom python software based on hidden Markov models followed by visual inspection. Sleep states with high theta were classified as REM and the remainder were classified as NREM. Wake periods with high theta were labelled as ‘active’ and the remaining were labelled ‘quiet’. These labels were merged in WAKE for the main figures. All detected states went through further visual inspection to correct any misclassifications. Detailed, interactive sleep scoring plots for each session are available at: https://github.com/diba-lab/sleep_loss_hippocampal_replay.

Detection of delta waves, delta power and OFF states

To detect hippocampal delta waves70, hippocampal LFP was filtered (0.5–4 Hz) and the resulting filtered signal was z-scored. The first-order derivative of this signal was used to identify upward-downward-upward zero crossings, which corresponded to the beginning, peak and end of the delta wave, respectively. Delta waves lasting for less than 150 ms or more than 500 ms were discarded. In addition, we required the amplitude at peak to be either greater than 2 s.d. or the amplitude at peak more than 1 s.d. and amplitude at end less than −1.5 s.d.

Delta power spectral density was calculated by extracting LFP signal from a channel localized in the CA1 pyramidal cell layer with Welch’s method using 4 s bins.

The multi-unit activity (MUA) smoothed with a Gaussian kernel of σ = 20 ms was used to detected OFF periods, following a method adapted from ref. 21. Candidate OFF periods were identified when the MUA firing rate dropped below the session median. The surrounding timepoints when the firing rate reached the lowest 10 percentile were used to mark the onset, offsets and corresponding duration of these events.

Explained variance measure for reactivation

Reactivation was assessed by the EV measure following previously described methods35,36. This EV describes how much of the co-activity in a pair of neurons for a given window in POST is explained by the co-activity of those neurons during MAZE, while controlling for co-activity that was present during similar windows in PRE. Briefly, spike times were binned into 250 ms time bins, creating an N by T matrix, where N is the number of neurons and T is the number of time bins. Pearson’s correlations, R, were determined for spike counts from neuronal pairs in 15 min sliding windows (window length 15 min, sliding 5 min steps) to produce P, an M-dimensional vector, where M is the number of cell pairs. To reduce spurious correlations arising from cross contamination of units from the same shank71, only pairs with waveform similarity of less than 0.8 were used. Next, to assess similarity between P vectors from different windows, the Pearson correlation R of these vectors (that is, the correlation between cell pair correlations) was determined (for example, R[PRE, POST], R[PRE, MAZE] and R[MAZE, POST]). Controlling for pre-existing correlations in a given sliding window (k) in PRE, the EV for a 15 min window (WIN) was calculated as:

$${\rm{EV}}({\rm{WIN}})={\left(\frac{{R}_{[{\rm{MAZE}},{\rm{WIN}}]}-{R}_{[{\rm{MAZE}},{\rm{PRE}}(k)]}\times {R}_{[{\rm{PRE}}(k),{\rm{WIN}}]}}{\sqrt{1-{R}_{[{\rm{MAZE}},{\rm{PRE}}(k)]}^{2}}\sqrt{1-{R}_{[{\rm{PRE}}(k),{\rm{WIN}}]}^{2}}}\right)}^{2}$$

averaged over all windows in PRE. To get an estimate of the chance level for EV, we calculated REV for each WIN37,72:

$${\rm{REV}}({\rm{WIN}})={\left(\frac{{R}_{[{\rm{MAZE}},{\rm{PRE}}(k)]}-{R}_{[{\rm{MAZE}},{\rm{WIN}}]}\times {R}_{[{\rm{PRE}}(k),{\rm{WIN}}]}}{\sqrt{1-{R}_{[{\rm{MAZE}},{\rm{PRE}}(k)]}^{2}}\sqrt{1-{R}_{[{\rm{PRE}}(k),{\rm{WIN}}]}^{2}}}\right)}^{2}$$

similarly averaged over PRE.

To estimate the time constant of reactivation from each session35, we fit the time course, t, of bootstrap and session EV curves to an exponential function:

$${\rm{EV}}\left(t\right)=a{{\rm{e}}}^{-t/\tau }$$

where τ provides the exponential decay constant and a is a scaling factor.

Only sessions with more than 15 stable units were used in the reactivation and replay analyses (13 of 16 recorded sessions from six of seven animals).

Place field calculations

To calculate one-dimensional place fields, animals’ two-dimensional positions were linearized using ISOMAP73 and visually inspected to ensure accuracy. For each unit, two firing-rate maps were generated corresponding to each running direction. Occupancy within 2 cm spatial bins at timepoints when the animal’s speed exceeded 8 cm s−1 were calculated and smoothed with a Gaussian kernel (σ = 4 cm). For each neuron, spike counts in each spatial bin were determined and also smoothed with the Gaussian kernel (σ = 4 cm). Then, each neuron’s firing-rate map was generated by dividing the smoothed spike counts by the smoothed occupancy map. Neurons with peak firing rate of less than 0.5 Hz were excluded from further analysis.

Decoding and trajectory replays

MUA was used to detect population burst events that are concurrent with SWR. In a session, the firing rate of MUA was derived from all putative spikes combined from all clusters then binned in 1 ms time bin and smoothed using a Gaussian kernel of σ = 20 ms. Periods with peak MUA > 3 s.d. above the mean firing rate were considered candidate ripple events. The start and end times of these ripple events were defined by the first neighbouring timepoints at which the MUA exceeded the mean. Ripple events occurring within 10 ms of each other were merged. Ripple events with duration of less than 80 ms or greater than 500 ms were discarded.

Before decoding, candidate ripple events were required to satisfy (1) five or more active units, (2) movement speed of less than 8 cm s−1 and (3) concurrent peak ripple power of more than 1 s.d. For these analyses alone, to minimize decoding error, we included all stable clusters with a mean firing rate of less than 10 Hz, regardless of their isolation quality74. Position decoding was carried out on ripple events using standard Bayesian decoding75 methods. Probabilities of the animal occupying each position bin xP on the track were calculated according to:

$$P\left({x}_{p}| {n}_{t}\right)=\,{K}_{t}\left\{\left.\mathop{\prod }\limits_{i=1}^{N}{\lambda }_{i}{\left[{x}_{p}\right]}^{{n}_{i,t}}\right\}\right.{{\rm{e}}}^{-\tau \mathop{\sum }\limits_{i=1}^{N}{\lambda }_{i}\left[{x}_{p}\right]}$$

where τ is the duration of the time bin (20 ms) used, \({\lambda }_{i}\left[{x}_{p}\right]\) is the firing rate of the ith neuron at xP on the maze, Kt is a normalization constant to ensure that the sum of probabilities across all position bins equals to 1 and nt is the number of spikes fired by each neuron in that bin. The location with the maximum posterior probability was considered the ‘decoded location’ for each time bin. A candidate ripple event was classified as a ‘trajectory replay’ if it decoded a continuous trajectory across space for 60 ms or more, such that the distance between decoded locations in adjacent time bins was less than 40 cm. Posterior probability matrices for all ripple events that were classified as replay have been compiled in an interactive plot available in our GitHub repository (https://github.com/diba-lab/sleep_loss_hippocampal_replay).

Hierarchical bootstrapping

We used HB26 to estimate confidence intervals and P values for different variables following code found at https://github.com/soberlab/Hierarchical-Bootstrap-Paper. For each metric we generated a population of 10,000 values by resampling with replacement at each level of the data hierarchy (first sessions, then for each session, the variable measured; for example, frequency of the SWR) and pooled the values to calculate the test statistic and corresponding confidence interval or IQR. Two-tailed tests with α = 0.05 were used for within-group comparisons, in which the P value was determined from the proportion of bootstraps for which the test statistic in one group exceeded that of the other group. The within-group comparisons generated one-sided hypotheses for cross-group testing, performed at α = 0.05. For these cross-group comparisons, we used the joint probability distributions of the bootstrapped samples to determine the P value: the likelihood that the mean of group one is greater than or equal to the mean of group two. All HB data were visualized using box and whisker plots generated using the boxplot function from the matplotlib (v.3.8.1) and Seaborn (v.0.11.2) Python packages to depict the median and first or third quartiles, with whiskers extending to 1.5× IQR. For testing if firing-rate distributions differed from log-normal, Shapiro–Wilk tests were performed on each bootstrapped log distribution and the P value was determined from the proportion of bootstraps with significant skew at α = 0.05. Detailed statistics with estimated P values for all performed comparisons are found in the Supplementary Table 1.

Parametric statistics

For instances in which parametric tests were more appropriate, the exact P values, test statistics, confidence intervals and degrees of freedom are provided in the Supplementary Table 2.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.