Main

Although sleep is conserved across the animal kingdom1, the precise functions of sleep remain unclear. As sleep deprivation leads to acute impairment of cognitive performance5, many theories posit that synaptic plasticity associated with learning and memory preferentially occurs during sleep6. For example, the synaptic homeostasis hypothesis (SHY) proposes that synaptic potentiation during wakefulness results in an ultimately unsustainable increase in synaptic strength and number that must be renormalized during sleep through synaptic weakening and pruning2,7,8. Such sleep-dependent renormalization has been postulated to broadly affect most excitatory synapses throughout the brain2.

Many, but not all, experimental observations of brain-wide changes in synapses have been consistent with the SHY. Globally, synaptic genes, proteins and post-translational modifications are upregulated during waking and renormalized during sleep9,10,11,12. In both flies and mice, the number and size of excitatory synapses also increase after prolonged waking and decline during sleep3,10,13. Long-term imaging of small segments of dendrites in young and adult mice has also been used to observe sleep–wake-linked synapse dynamics4,14,15 and, in zebrafish, axon terminals of wake-promoting hypocretin neurons are regulated by the circadian clock16. However, other studies have observed no impact of sleep–wake states on synaptic strength and neuronal firing rates17,18, and some have observed synaptic strengthening during sleep19,20,21,22. Furthermore, distinct classes of synapse within the same neuronal population can be differentially regulated by sleep–wake states23, consistent with observations that synaptic plasticity can be regulated in a dendritic-branch-specific manner24. Together, these observations paint a complex picture of how sleep sculpts synapse number and strength, raising fundamental questions about whether sleep-dependent synaptic homeostasis operates uniformly across neuronal types and at which scale (for example, dendrite, neuron, circuit or population) sleep acts to modulate synapses.

To examine the scope and selectivity of sleep-linked synaptic plasticity, it is vital to comprehensively track the synaptic changes of individual neurons through sleep–wake states. To that end, we used in vivo synaptic labelling tools in larval zebrafish to image the same neurons and their synapses repeatedly over long timescales, enabling us to map single-neuron synapse changes across sleep and wake states.

Synapse counts change across 24 h

To visualize excitatory synapses in single zebrafish neurons, we adapted an established fibronectin intrabodies generated with mRNA display (FingR)-based transgenic system that selectively binds to and labels postsynaptic density protein 95 (PSD95)25,26,27, a major postsynaptic scaffold of excitatory synapses28,29 and a readout of synaptic strength30,31, to enable simultaneous imaging of synapses and neuronal morphology (Fig. 1a). Consistent with previous reports25,27,32, we confirmed that this modified FingR(PSD95) system labels synapses with high fidelity by driving expression of Tg(UAS:FingR(PSD95)-GFP-P2A-mKate2f) in the spinal cord with a Tg(mnx1:Gal4) driver line and co-labelling with anti-MAGUK antibodies that recognize the PSD95 protein family. Greater than 90% of FingR(PSD95)+ puncta associated with MAGUK, while 100% of neuronal MAGUK puncta were co-labelled with FingR(PSD95) (Extended Data Fig. 1a–e,h–i). The signal intensities of co-labelled MAGUK and FingR(PSD95) synapses were positively correlated, indicating that the signal intensity is a reliable readout of synaptic PSD95 content, as reported previously26 (Extended Data Fig. 1f,g).

Fig. 1: Single-neuron synapse tracking across day–night cycles reveals diverse dynamics.
figure 1

a, The synapse labelling construct. Zinc finger (ZF) and KRAB(A) domains limit overexpression25. b, The strategy to sparsely label synapses of FoxP2.A+ tectal neurons (Methods). c, Example FoxP2.A:FingR(PSD95)+ neuron at 7 d.p.f., with the synapses (white arrowheads, left), nucleus (blue arrowheads, left) and membrane (magenta, right) co-labelled. d, Overnight time-lapse tracking of select synapses from the neuron in c. The normalized GFP intensity (shading) is shown for each synapse (rows). The complete neuron map is shown in Extended Data Fig. 2a. e, Larvae were raised on 14 h–10 h light–dark (LD) cycles (blue), constant light (LL, pink) or switched from LD to LL at 6 d.p.f. (free running (FR), green), and then imaged (arrows) (Methods). f, The average locomotor activity and 95% confidence intervals (CIs) of larvae reared under LD (blue, n = 75), clock-break LL (pink, n = 84) or FR (green, n = 98) conditions. gj, The mean and 68% CI (column 1) and individual neuron (columns 2–4) synapse counts (g), percentage change in synapse number calculated within each neuron (h), normalized synapse intensity (i) and percentage change in synapse intensity (j) under the LD (blue), LL (pink) or FR (green) conditions. For columns 2–4, a line is shown for each neuron, collected across 8 LD, 4 LL and 4 FR independent experiments. For h, synapse number change (Δ synapse number) dynamics are different during the day from those during the night under LD conditions (*P = 0.043, repeated-measures analysis of variance (ANOVA)). Synapse number change dynamics under LD cycling are significantly different from those under LL conditions (*P = 0.015, main effect of condition, two-tailed mixed ANOVA, post hoc Benjamini–Hochberg correction; Hedge’s g = 0.761). For j, day–night dynamics are significantly different under LD from those under the other conditions (P < 0.01, repeated-measures ANOVA). Both daytime FR and LD day–night dynamics are significantly different from those under the LL condition (mixed ANOVA interaction (condition × time), P = 0.029; FR versus LL, P = 0.038, g = 0.937; LD versus LL, P = 0.027, g = 0.792; post hoc Benjamini–Hochberg correction, two-tailed). At night, LD versus FR, g = −0.538; LD versus LL, g = −0.527. The diagram in a is adapted from ref. 27, CC BY 4.0, and the diagram in b is adapted from ref. 33, CC BY 4.0. The colour key in e applies also to fi.

Source Data

To test whether behavioural state modulates synapse strength and number at the single-neuron level, we focused on larval tectal neurons, which are accessible to imaging, have well-defined morphological and functional identities33 and have a stable window of synapse maturation from 7 to 9 days post-fertilization (d.p.f.)34. Tectal neurons also undergo spike-timing-dependent plasticity35 and receive a mixture of inputs that foster ‘competition’ among synapses36,37, a criterion envisaged by the SHY2. To sparsely label tectal neurons, we co-electroporated a plasmid driving Gal4 off the foxp2.A promoter with tol2 mRNA into Tg(UAS:FingR(PSD95)-GFP-P2A-mKate2f) larvae at 3 d.p.f.38 (Fig. 1b,c and Methods). This method resulted in approximately 10% of larvae containing a single FoxP2.A:FingR(PSD95)+ neuron, allowing for repeated, long-term imaging of the synapse counts and intensities in the same neuron in a continuously mounted preparation (Fig. 1c,d and Extended Data Fig. 2a). After confirming the relative stability of tectal neuron synapse counts in the 6–9 d.p.f. developmental window (Extended Data Fig. 2b–d), we imaged each labelled neuron across a 14 h–10 h light–dark cycle at 7 d.p.f., collecting images just after lights on (zeitgeber time 0 (ZT0), 7 d.p.f.), near the end of the day (ZT10) and after a night of sleep (ZT0, 8 d.p.f.) (Fig. 1e; an example neuron with synapse changes tracked across two timepoints is shown in Extended Data Fig. 3), leaving larvae to behave freely between imaging sessions. On average, the tectal neuron synapse number increased significantly during the day from 137 to 153 synapses (+14.4%) but decreased at night by −1.90% to 146 synapses (Fig. 1g,h (blue)). Similar day–night changes in the net synapse counts were observed in separate experiments that imaged neurons over multiple days and nights (Extended Data Fig. 4a–e), with no evidence of artefacts from repeated imaging (Extended Data Fig. 4f–h). Moreover, the average synapse FingR(PSD95)–GFP signal intensity increased significantly during the waking day phase (+36.8%) and decreased in the night sleep phase (−11.7%) (Fig. 1i,j).

To test whether these synaptic dynamics are influenced by the direct action of lighting conditions or are instead controlled by an internal circadian clock, we also tracked neurons under conditions of either constant light from fertilization, which prevents the formation of functional circadian clocks and leads to arrhythmic behaviour in zebrafish (clock-break)39,40,41, or constant light after light–dark entrainment, which maintains damped circadian behaviour (free running)42 (Fig. 1e,f). Under clock-break conditions, changes in synapse number and intensity were abolished and remained smaller compared with in larvae raised on light–dark cycles (Fig. 1g–j (pink)). Under free-running conditions, synapse numbers continued to increase during the subjective day and decrease during the subjective night, albeit strongly damped (Fig. 1g,h (green)). The average synapse intensity was significantly elevated across all timepoints and showed a further significant increase in strength only during the subjective day, with no loss of intensity during the subjective night (Fig. 1i,j (green)). Collectively, these data show that, while light influences the baseline levels of synaptic strength (Fig. 1i), changes in synapse counts are independent of lighting conditions but do require an intact circadian clock (to drive rhythmic sleep–wake behaviour; see below) (Fig. 1g).

Moreover, although rhythmic day–night changes in synapses were detected in the average of all of the single neurons, the tracking of individual neurons revealed that many cells have different, even opposing, synaptic dynamics (Fig. 1g–j (right)). We therefore sought to test whether these diverse patterns mapped onto distinct neuronal subtypes (that is, cellular diversity) or whether they are due to variations in animal behaviour (that is, individual sleep–wake histories).

Synapse cycling across neuronal subtypes

To test whether distinct synapse day–night dynamics are associated with morphological subtypes of tectal neurons, we measured position, branching, length and other parameters of FoxP2.A:FingR(PSD95)–GFP+ neurons, many of which project only within the tectum at 7 d.p.f. Clustering analysis found four subtypes, consistent with previous studies33,43 (Fig. 2a–c and Extended Data Fig. 5a–c). Tracking synapses across three light–dark cycles revealed that each neuronal subtype has, on average, different patterns of net synapse counts (excluding the rarely observed type 1 neurons). Specifically, dynamics consistent with the SHY were robustly observed only in the densely bistratified type 2 neurons, with an average increase of 15.3 synapses during the day and a reduction of 17.7 synapses at night, and weakly observed in type 4 neurons (+8.5 during the day and −8.2 overnight; Fig. 2d–g and Extended Data Fig. 5d–f). By contrast, many type 3 neurons consistently exhibited the opposite pattern, with an average increase in synapse number at night and a slight decrease during the day (Fig. 2d–g). However, compared with under clock-break conditions, in which no subjective day–night-linked changes occur (Extended Data Figs. 5g–j and 6a,b), the FingR(PSD95)–GFP signal intensity of type 3 and 4 neurons, but not type 2 neurons, increased during the day and decreased at night (Extended Data Fig. 6a–c), suggesting that synapse number and PSD95 content are differentially regulated in tectal subtypes. These subtype-specific alterations in synapse number cannot be explained by differences in larval sleep–wake behaviour, as the sleep amount was the same regardless of which neuron subtype was labelled in the larva (Extended Data Fig. 7a–c).

Fig. 2: Subtype-specific synapse changes in FoxP2.A tectal neurons over 3 days.
figure 2

a, The morphological parameters used to characterize FoxP2.A tectal neurons. A–P, anterior–posterior. b, Examples of each morphological subtype, chosen from n = 17 (type 1), n = 28 (type 2), n = 61 (type 3) and n = 42 (type 4) neurons collected over 26 independent experiments. The blue circles label nuclei. c, Example of the parameters used to distinguish the four subtypes. For the box plots, the centre lines show the median, the box limits show the interquartile range and the whiskers represent the distribution for each parameter. The slashed zero indicates that the feature is absent. See also Extended Data Fig. 5. dg, Synapse counts across multiple LD cycles for FoxP2.A tectal neurons of different subtypes. d,e, Average (68% CI) synapse counts (d) and average (68% CI) synapse number change (e) of subtypes (column 1) and for each neuron (columns 2–4), collected over 8 independent experiments. f,g, Average (68% CI) synapse counts (f) and net change (g), averaged across all days and nights for each subtype and larvae, including additional neurons tracked over a single day (Extended Data Fig. 5). Tectal subtype influences synapse changes (mixed ANOVA, interaction P = 0.012, subtype × time). Type 2 (n = 16) and type 4 (n = 15) neurons gain more synapses during the day under LD conditions compared with under LL clock-break conditions (P = 0.018, g = 0.952; P = 0.021, g = 0.812, respectively). At night, both type 2 and type 4 neurons lose synapses relative to type 3 (type 2 versus type 3, P = 0.038; g = −0.714; type 4 versus type 3, P = 0.038, g = −0.781, post hoc Benjamini–Hochberg correction, one-tailed). For b, scale bars, 10 μm.

Source Data

As type 2 neurons have two prominent arbourization fields, we examined whether changes in day–night synapse number are heterogenous across different dendritic segments of individual neurons. Analysing the synapse number changes in four distinct classes of dendritic segment in type 2 neurons revealed that only the proximal arbour, which receives local inputs from the tectum and long-range inputs from brain areas such as the hypothalamus44, displayed significantly robust average increases in synapse number during the day and reductions at night (Extended Data Fig. 7d–f). By contrast, synapse number dynamics within the distal arbour, which receives the majority of its inputs from the retina43, were more diverse. No correlations could be detected among the different dendritic compartments within the same neuron (Extended Data Fig. 7f), suggesting that the time of day and sleep–wake states do not have uniform effects on synapse number even within the same neuron.

Sleep pressure facilitates synapse loss

If the synapses of individual neurons are regulated by sleep–wake states independently of the circadian clock, these dynamics should be altered by sleep deprivation (SD). We developed a gentle handling SD protocol in which zebrafish larvae are manually kept awake with a paintbrush for 4 h at the beginning of the night (ZT14–ZT18) and subsequently allowed to sleep (Supplementary Video 1). Sleep in larval zebrafish is defined as a period of inactivity lasting longer than 1 min, as this is associated with an increased arousal threshold, homeostatic rebound and other criteria of sleep40,45. After SD, the phase of the circadian clock machinery was unaffected, but larvae slept significantly more, with individual sleep bouts lasting longer, compared with non-sleep-deprived larvae (Extended Data Fig. 8a,b), consistent with SD leading to increased sleep pressure46,47,48. Next, we visualized synapses of individual tectal neurons at 7 d.p.f. immediately before (ZT13–ZT14) and after (ZT18–ZT20) SD, and again the next morning (ZT0–ZT1) (Fig. 3a and Extended Data Fig. 9a). Between the imaging sessions, we used video tracking to monitor sleep–wake behaviour (Methods). In control larvae, tectal neurons lost synapses overnight; however, this synapse loss was confined to the first part of the night (ZT14–ZT18), with an average loss of 1.7 synapses per hour, in contrast to the last part of the night (ZT18–ZT24), during which synapse loss was undetectable (+0.2 synapses per hour) (Fig. 3b (blue)). By contrast, neurons gained an average of 2.8 synapses per hour during SD (Fig. 3b (orange)). During the recovery period after SD, tectal neurons lost synapses at a rate of 2.2 synapses per hour (Fig. 3b and Extended Data Fig. 8c). As during normal sleep, FoxP2.A tectal neuron subtypes responded differently to SD, with type 2 and even type 3 neurons (which did not have SHY-concordant changes under baseline conditions) gaining synapses during SD and losing them during recovery sleep, whereas type 4 neurons did not show any change (Extended Data Fig. 8d). This suggests that SD biases synapses towards loss during subsequent sleep, even in neurons with different synapse dynamics under baseline conditions.

Fig. 3: Synapse counts of neurons are modulated by sleep and SD.
figure 3

a, The 4 h gentle handling SD paradigm (ZT14–ZT18). Larvae were video-tracked and neurons were periodically imaged (arrows). b, The mean ± s.e.m. change in synapse counts per hour for the SD (orange, n = 31 neurons) and control (blue, n = 28) groups. c, Sleep time versus the change in synapse counts per hour for each larva during either the early (ZT14–ZT18, left) or late (ZT18–ZT24, middle) night for controls and after SD (ZT18–ZT24, right). The rate of synapse change is negatively correlated with sleep time during both early and late night but not after SD. d, In control larvae, the change in early night synapse counts is negatively correlated with late night synapse change. Early and late sleepers are defined as larvae that either sleep more in the first or second phase of the night, respectively. e, Synapse counts per hour for early- and late-night sleeping control larvae in the early (ZT14–ZT18) and late (ZT18–ZT24) phases of the night. Data are mean ± s.e.m. fh, The reticulospinal neuron synapse number is modulated by sleep and wake states. f, Example reticulospinal neurons from the Tg(pvalb6:KALTA4)u508 line co-labelled by FingR(PSD95)–GFP (green, nuclei and synapses) and mKate2f (magenta, membrane). Vestibulospinal (VS) and MiD2cm neurons are indicated by the dashed ovals. g, Vestibulospinal (top) and MiD2cm (bottom) neurons from different larvae showing FingR(PSD95)+ synapses (green) co-localized to the cell membrane (magenta). h, Changes in synapse number (mean and 68% CI) from ZT14 to ZT18 for vestibulospinal and MiD2cm neurons. Each dot represents the average across multiple neurons per larva. For b and e, statistical analysis was performed using two-tailed mixed ANOVA interaction (condition × time) with post hoc Benjamini–Hochberg correction; ****P = 0.00007, ***P = 0.0002 and **P = 0.006 (b) and *P = 0.01 (e). For h, statistical analysis was performed using one-tailed Student’s t-tests; *P < 0.03. Scale bars, 15 μm (f) and 10 μm (g). The lines in c and d depict the linear regression with the 95% CI.

Source Data

As both SD and control larvae were at the same circadian phase, we conclude that sleep–wake states are the main driver of net changes in synapses in tectal neurons, and the effects of circadian clock disruption on synapses were primarily due to the loss of sleep rhythms (Fig. 1). Consistent with this interpretation, the total time that each larva spent asleep was significantly correlated with the rate of synapse change (Fig. 3c and Extended Data Fig. 8g). Only after SD, when sleep and synapse loss were high across most larva–neuron pairs, was this correlation lost, which may indicate that either the machinery that supports sleep-dependent synapse loss can saturate or SD-induced rebound sleep is not fully equivalent to baseline sleep. The converse relationship was not observed, as the rate of synapse gain during SD was not correlated with either the subsequent total sleep or the average sleep bout lengths of single larvae (Extended Data Fig. 8f). Consistent with the effects of SD, natural individual variation in sleep timing was predictive of the time period in which synapses were lost. ‘Early sleepers’ slept more during the first half of the night and lost synapses only during this period, whereas ‘late sleepers’ preferentially slept in the second half of the night and had a net loss of synapses only during the late night (Fig. 3d,e and Extended Data Fig. 8e). Finally, to test whether sleep-dependent synapse loss is generalizable to neurons that do not receive direct retinal input, we confirmed that synapses of both presumptive vestibulospinal neurons that stabilize posture49 and MiD2cm reticulospinal neurons involved in fast escapes50,51 showed synapse gains during SD and synapse loss during sleep (Fig. 3f–h).

Two explanations are consistent with the observed relationships between sleep and synapse change: either sleep is a permissive state for synapse loss, or sleep pressure, which builds as a function of waking, drives synapse loss during subsequent sleep. As sleep pressure and subsequent sleep amount at night are tightly linked under both baseline and SD conditions, we sought to disentangle their relative influences on synaptic change using sleep-inducing drugs to force larvae to sleep during the day, when sleep pressure remains low (Fig. 4a,b and Extended Data Fig. 9c). Exposing larvae for 5 h during the day (ZT5–ZT10) to either 30 µM melatonin, which in zebrafish is a natural hypnotic that acts downstream of the circadian clock to promote sleep52, or 30 µM clonidine, an α2-adrenergic receptor agonist that inhibits noradrenaline release and increases sleep in zebrafish45,53, significantly and strongly increased total sleep and the average length of sleep bouts mid-day (Fig. 4c and Extended Data Fig. 10a,b), with this drug-induced sleep remaining reversible by strong stimuli (Extended Data Figs. 9d,e and 10d–g). Forced daytime sleep altered the build-up of sleep pressure, leading to reduced and delayed sleep in the subsequent night (Extended Data Fig. 9e). However, drug-induced sleep at a time of low sleep pressure was not sufficient to trigger synapse loss, with tectal neurons still gaining an average of 1.0–1.7 synapses per hour, which was not significantly different from the synapse gains in the controls (Fig. 4d). Similarly, artificially boosting adenosine signalling—one of the postulated molecular substrates of sleep pressure54—by administering 45 µM 2-choloroadenosine increased sleep during the day but also led to net gains in tectal neuron synapses (+0.9 synapse per hour) (Fig. 4c and Extended Data Fig. 10c). Tectal neurons also gained synapses (+0.4 synapse per hour) in larvae that were co-administered 2-chloroadenosine and melatonin, despite sleeping more than 35 minutes per hour (Fig. 4c,d). By contrast, simultaneously boosting adenosine signalling while inhibiting noradrenaline release with clonidine resulted in synapse loss (−0.8 synapses per hour) in tectal neurons (Fig. 4c,d and Extended Data Fig. 9c), which express both adenosine and adrenergic receptors (Extended Data Fig. 11). These results demonstrate that daytime sleep can support synapse loss under conditions of high sleep pressure and low noradrenergic tone, possibly through direct signalling events.

Fig. 4: Single-neuron synapse loss during sleep is driven by boosting adenosine and blocking noradrenaline.
figure 4

a, Larvae were temporarily treated with sleep-promoting drugs during the day (ZT5–ZT10). The black arrows indicate the imaging periods before and after drug treatment. b, Drug-induced sleep during the day disentangles sleep pressure (that is, low) from sleep amount (that is, high), which are otherwise tightly correlated. c, Drug-treated larvae sleep significantly more during the day compared with the dimethyl sulfoxide (DMSO)-treated controls. d, During the day (from ZT5–ZT10), synapse counts increase under all control and drug conditions, except during co-administration of clonidine and 2-chloroadenosine, when synapses are significantly lost. Data are mean ± s.e.m. n values represent the number of neurons (top row) or fish (bottom row). For c and d, statistical analysis was performed using Kruskal–Wallis tests with post hoc Dunn’s multiple-comparison test (left) and one-way ANOVA (right); not significant (NS), P > 0.5; *P = 0.034, **P < 0.01, ****P < 0.0001.

Source Data

Discussion

The SHY proposes that synapse numbers and strength increase during wake and decrease during sleep. By tracking synapses of single tectal neurons through sleep–wake states and circadian time, our data resolve several outstanding questions about the scale, universality and mechanisms of sleep-linked plasticity. We show that SHY-concordant dynamics of the synapse population within single neurons are present on average across many cells but, when examined on a neuron-by-neuron basis, more diverse patterns of synapse change are revealed. These observations may explain some discrepancies among previous studies of the SHY, as these single-neuron synaptic dynamics would not be captured by population-level, single-time-point snapshots of synapse number or function. We also show that sleep is necessary but not sufficient for synaptic loss, as synapse loss occurred only when sleep was accompanied by high sleep pressure associated with adenosine signalling and low noradrenergic tone. Adenosine signalling has been shown to promote Homer1a-dependent downscaling and destabilization of synapses, whereas noradrenergic signalling has been found to prevent this process55. Our data link these mechanisms to sleep pressure and sleep behaviour in vivo. Whether single-neuron or subcellular variation in the expression or sensitivity to these synapse-regulating signals could account for the diversity of synapse alterations remains an interesting possibility for future work. Sleep pressure, as reflected by the density of slow-wave activity in mammalian sleep, has also been linked to changes in synapses associated with learning and memory11,56. We find that sleep-linked synapse loss depends on molecular signals linked to high sleep pressure and, notably, also mirrors slow-wave activity by occurring predominantly in the early part of the sleep period6. This finding raises the question of whether epochs of sleep associated with low sleep pressure, such as in the latter half of the night, have additional, non-synaptic remodelling roles. If so, the evolution, persistence and ubiquity of these different sleep epochs could be under specific regulatory and selective pressures.

Methods

Animals

Zebrafish husbandry and experiments were conducted according to UCL Fish Facility standard protocols and under project licenses PA8D4D0E5 and PP6325955 awarded to J.R., according to the UK Animal Scientific Procedures Act (1986). Embryos were kept in Petri dishes in fish water (5 mM NaCl, 0.17 mM KCl, 0.33 mM CaCl2, 0.33 mM MgSO4 and 0.1% methylene blue) in a 14 h–10 h light–dark cycle incubator at 28 °C. Petri dishes exposed only to fish water were cleaned with 75% ethanol, washed, soaked overnight in distilled water, air-dried and rinsed with fish water before reuse. The sex of AB/TL zebrafish larvae is not biologically determined at the early developmental stages used for these studies.

Cloning and transgenesis

Transgene constructs that simultaneously encode FingR targeting PSD95 and membrane markers of neuronal morphology were generated using the In-Fusion HD Cloning System (Clontech). First, the GFP in a pCS2-P2A-GFP-CAAX was replaced with mKate2f by combining the linearized pCS2 (through inverse PCR; primers: 5′-GGATCTAGGACCGGGGTTTTC-3′ and 5′-GTGCTCTCCTGACCTCTAGAA-3′) with amplified mKate2f from dUAS-mKate2f (gift from the Tada laboratory, UCL) with 15 bp overhangs complementary to pCS2 site of insertion (primers: 5′-CCCGGTCCTAGATCCATGGTGAGCGAGCTGATTAAG-3′ and 5′- AGGTCAGGAGAGCACTCAGGAGAGCACACAGCAGCT-3′). Next, the template plasmid pTol2-zcUAS:PSD95.FingR-EGFP-CCR5TC-KRAB(A) (from the Bonkowsky laboratory, University of Utah; Addgene, 72638) was linearized by inverse PCR after the KRAB(A) sequence (primers: 5′-AGCCATAGAAGCAAGATTAGA-3′ and 5′- GGAGGTGTGGGAGGTTTTTTC-3′). The P2A-mKate2f sequences were then amplified with 15 bp overhangs complementary to the pTol2-zcUAS:PSD95.FingR-EGFP-CCR5TC-KRAB(A) insertion site (primers: 5′-CTTGCTTCTATGGCTGCCACGAACTTCTCTCTGTTA-3′ and 5′- ACCTCCCACACCTCCTCAGGAGAGCACACAGCAGCT-3′) and combined with the linearized FingR template.

To generate the stable Tg(UAS:FingR(PSD95)-GFP-CCR5TC-KRAB(A)-P2A-mKate2f) line, purified pTol2-zcUAS:PSD95.FingR-EGFP-CCR5TC-KRAB(A)-P2A-mKate2f DNA construct was sequenced to confirm gene insertion and co-injected (10 ng µl−1) with emx3:Gal4FF57 (10 ng µl−1) and tol2 transposase mRNA (100 ng µl−1) at 1 nl into wild-type TL embryos at the one-cell stage. At 3 d.p.f., injected embryos were screened for mosaic expression of mKate2f, then raised to adulthood. The tol2 transposase mRNA was in vitro transcribed from the NotI-linearized pCS-TP6287 plasmid (gift from the Wilson laboratory, UCL) using the SP6 mMESSAGE mMACHINE Kit (Ambion). RNA was purified using RNA Clean & Concentrator Kits (Zymo Research). Germline transmission was determined by mating adult fish to nacre mutants (mitfaw2/w2, pigmentation mutants58) and subsequently identifying their progeny for mKate2f fluorescence, then raising to adulthood to establish a stable Tg(UAS:FingR(PSD95)-GFP-CCR5TC-KRAB(A)-P2A-mKate2f)u541;Tg(emx3:Gal4FF)u542 line. Owing to the negative-feedback mechanism in the system, Tg(UAS:FingR(PSD95)-GFP-CCR5TC-KRAB(A)-P2A-mKate2f) expression is extremely low. To increase the number of transgene copies and the level of expression in the background reporter line, the double transgenic Tg(UAS:FingR(PSD95)-GFP-CCR5TC-KRAB(A)-P2A-mKate2f);Tg(emx3:Gal4) fish were incrossed for imaging experiments and maintained by alternating incrosses and outcrosses to nacre mutants.

Whole-mount synaptic immunohistochemistry and imaging

Staining for MAGUK expression was performed using whole-mount immunohistochemistry adapted from a previous study59. Zebrafish larvae (2 d.p.f.) were dechorionated and fixed with 4% formaldehyde methanol-free (Pierce Thermo Fisher Scientific, 28906) in BT buffer (1.0 g sucrose, 18.75 µl 0.2 M CaCl2, topped up to 15 ml with PO4 buffer (8 parts 0.1 M NaH2PO4 and 2 parts 0.1 M Na2HPO4)). To increase the signal-to-noise ratio, the fixing time was decreased to 1.5–2 h at 4 °C, although this led to softer samples. The samples were washed with PO4 buffer and distilled H2O for 5 min at room temperature, then permeabilized with ice-cold 100% acetone for 5 min at −20 °C. After washing with distilled H2O and PO4 buffer for 5 min each, the samples were blocked with blocking buffer containing 2% goat serum, 1% bovine serum albumin and 1% DMSO in 0.1 M PBS pH 7.4 for at least 2 h. The samples were then incubated with primary antibodies (see below for list) diluted in blocking buffer at 4 °C overnight. The embryos were washed 4–6 times for at least 20 min in blocking buffer at room temperature and incubated in secondary antibodies overnight at 4 °C. To remove unbound secondary antibodies, the embryos were washed again and transferred to glycerol in a stepwise manner up to 80% glycerol in PBS.

The primary antibodies used for staining were anti-pan-MAGUK (mouse monoclonal, K28/86, Millipore) and anti-tRFP (rabbit polyclonal, AB233, Evrogen), both at a dilution of 1:500. To avoid overamplification of signal outside of the synapse, FingR(PSD95)–GFP puncta were visualized using its own fluorescence. The following secondary antibodies were used at a dilution of 1:200: Alexa-Fluor 568 goat anti-rabbit IgG and Alexa-Fluor 633 goat anti-mouse IgG monoclonal (Life Technologies).

Confocal images were obtained using the Leica TCS SP8 system with HC PL APO ×20/0.75 IMM CS2 multi-immersion objective set to glycerol (Leica Systems). z stacks were obtained at 1.0 μm depth intervals with sequential acquisition settings of 1,024 × 1,024 px. The raw images were compiled using NIH Image J (http://imagej.nih.gov/ij/). To analyse the colocalization of the puncta, maximum projections of 5–10 μm were taken for each cell. Grey values were taken from the cross-section of the puncta using the plot-profile tool from ImageJ. Puncta grey values were normalized against the whole-stack grey value of their respective channels.

The colocalization and relationships between FingR(PSD95)–GFP and antibody staining were analysed using custom Python scripts (available at GitHub (https://github.com/anyasupp/single-neuron-synapse)). For colocalization of FingR and antibody puncta (and vice versa), the presence of puncta with maximum normalized grey value of at least 50% higher than the baseline was used. To estimate the size of the puncta, the normalized grey values were interpolated with a cubic polynomial implemented by the SciPy (v.1.11.4) function scipy.interpolate.interp1d before finding the full width at half maximum.

Single-cell FingR(PSD95) expression using electroporation

To sparsely label single tectal cells, a FoxP2.A:Gal4FF activator plasmid (gift from M. Meyer) was electroporated into the Tg(UAS:FingR(PSD95)-GFP-ZFC(CCR5TC)-KRAB(A)-P2A-mKate2f)-positive larvae at 3 d.p.f according to a previously described method33. Anaesthetized 3 d.p.f. zebrafish larvae were mounted in 1% low-melting-point agarose (Sigma-Aldrich), perpendicular to a glass slide in a Petri dish filled with electroporation buffer (180 mM NaCl, 5 mM KCl, 1.8 mM CaCl2, 5 mM HEPES, pH 7.2) with 0.02% tricaine (MS-222, Sigma-Aldrich). Excess agarose along the larval body was then removed to allow access for the electroporation electrodes. A FoxP2.A:Gal4FF construct (500 ng µl−1) was injected into the midbrain ventricle together with tol2 mRNA (20 ng µl−1) and Phenol Red (~0.025%) at 5–8 nl using a micro glass needle (0.58 mm inside diameter, Sutter Instrument, BF100-58-15) pulled using a micropipette puller (Model P-87 Sutter Instrument). After injection, the positive electroporation electrode was placed lateral and slightly dorsal to the hemisphere of the target optic tectum, and the negative electrode was placed lateral and ventral to the contralateral eye. Five 5 ms trains of 85 V voltage pulses at 200 Hz were delivered through the electrodes using an SD9 stimulator (Grass Instruments). Electroporated larvae were screened for sparse, single-cell expression of FoxP2:FingR(PSD95)+ neurons using a ×20/1.0 NA water-dipping objective and an LSM 980 confocal microscope with Airyscan 2 (Zeiss) at 5–6 d.p.f.

Repeated Imaging of FingR-labelled synapses

For synapse-tracking experiments, Tg(UAS:FingR(PSD95)-GFP-CCR5TC-KRAB(A)-P2A-mKate2f) larvae that were electroporated with FoxP2.A:Gal4FF were reared at 28 °C under various light schedules. At 5–6 d.p.f., larvae were visually screened for the expression of single or sparsely labelled FoxP2.A:FingR(PSD95)+ neurons in the tectum using a ×20/1.0 NA water-dipping objective and the LSM 980 confocal microscope with Airyscan 2 (Zeiss) and placed into individual wells of six-well plates (Thermo Fisher Scientific) to keep track of individual larvae and the corresponding labelled neurons, each well containing approximately 10 ml of fish water. For repeated live imaging of reticulospinal neurons, Tg(UAS:FingR(PSD95)-GFP-CCR5TC-KRAB(A)-P2A-mKate2f) were crossed to a Tg(pvalb6:KALTA4)u508 driver line50 (gift from the Bianco laboratory at UCL) and visually screened for larvae with a labelled reticulospinal population. For imaging FingR(PSD95)-GFP puncta, the larvae were anaesthetized with 0.02% tricaine for 5–10 min and immobilized in 1.5–2% low-melting-point agarose (Sigma-Aldrich) in fish water. The larvae were head-immobilized with the tail free and allowed to recover from anaesthesia during imaging. Imaging was performed at the appropriate zeitgeber/circadian time (ZT, where ZT0 is lights on) according to the experimental paradigm. For day–night synapse tracking, larvae were repeatedly imaged at approximately ZT0–ZT2 and ZT10–ZT12 at 7 d.p.f., 8 d.p.f. and 9 d.p.f. at 28.5 °C with the chamber lights on. For imaging performed during the dark phase (ZT14–ZT24), the temperature was kept at 28.5 °C with the chamber lights off. When immobilizing the larvae for night imaging, the handling was performed under low red light (Blackburn Local Bike Rear Light 15 Lumen; 5.2–30.5 lux, measured at the plate level). After imaging, larvae were unmounted from agarose by releasing agarose around their heads and allowing the larvae to independently swim out of the agarose. Unmounted larvae were then placed back into individual wells of six-well plates.

FingR(PSD95)+ neuron image stacks were acquired using a ×20/1.0 NA water-dipping objective and the LSM 980 confocal microscope with Airyscan 2 (Zeiss). GFP and mKate2f were excited at 488 nm and 594 nm, respectively. z stacks were obtained at a 0.34 μm voxel depth with sequential acquisition settings of 2,024 × 2,024 px, giving a physical resolution of 0.0595376 μm in x, 0.0595376 μm in y and 0.3399999 μm in z and 16-bit using SR4 mode (imaging 4 pixels simultaneously). Pixel alignment and processing of the raw Airyscan stack were performed using ZEN Blue software (Zeiss).

Locomotor activity assay

Tracking of larval zebrafish behaviour was performed as previously described45, with slight modifications. Zebrafish larvae were raised at 28.5 °C under a 14 h–10 h light–dark (LD) cycle or constant light (LL) or switching from 14 h–10 h light–dark to constant light (free-running (FR) conditions). At 5–6 d.p.f., each FoxP2.A:FingR(PSD95)+ larva was placed into individual wells of a six-well plate (Thermo Fisher Scientific) containing approximately 10 ml of fish water. The locomotor activity of some larvae was monitored using an automated video tracking system (Zebrabox, Viewpoint LifeSciences) in a temperature-regulated room (26.5 °C) and illuminated with white lights on either 14 h–10 h light–dark cycles or constant light conditions at 480–550 lux with constant infrared illumination. The larval movement was recorded using the Videotrack ‘quantization’ mode with the following detection parameters: detection threshold, 15; burst, 100; freeze, 3; bin size, 60 s. The locomotor assay data were analysed using custom MATLAB (MathWorks) scripts available at GitHub (https://github.com/JRihel/Sleep-Analysis). Any 1 min period of inactivity was defined as 1 min of sleep, according to the established convention for larval zebrafish40. For experiments examining the effects of drug treatment on behaviour that did not involve live imaging, such as the clonidine dark pulse experiment (Extended Data Fig. 10d–g), 24-well (Thermo Fisher Scientific) and 96-well plates (Whatman) were used instead of the 6-well plates used for synapse imaging experiments. Sleep latency for Extended Data Fig. 9c–e was calculated using frame-by-frame data (collected at 25 fps), using code available at GitHub (https://github.com/francoiskroll/FramebyFrame).

Sleep deprivation assay

Zebrafish larvae were raised at 28.5 °C under a 14 h–10 h light–dark cycle to 6 d.p.f., when they were video-tracked (see the ‘Locomotor activity assay’ section). Randomly selected 7 d.p.f. larvae were then sleep deprived for 4 h immediately after lights off from ZT14 to ZT18. Non-deprived control larvae were left undisturbed. Larvae that were individually housed in six-well plates were manually sleep deprived under dim red light (Blackburn Local Bike Rear Light 15 Lumen) by repeated gentle stimulation using a No. 1-2 paintbrush (Daler-Rowney Graduate Brush) to prevent larvae from being immobile for longer than 1 min. For most stimulations, this required only putting the paintbrush into the water; if the larvae remained immobile, they were gently touched. The 4 h SD protocol was performed by experimenters in 2 h shifts. All sleep deprived and control larvae were imaged at around ZT14 and ZT18 on 7 d.p.f. and again at ZT0 on 8 d.p.f. (see the ‘Repeated imaging of FingR-labelled synapses’ section).

Drug exposure for live imaging

Tg(UAS:FingR(PSD95)-GFP-CCR5TC-KRAB(A)-P2A-mKate2f) larvae that had been electroporated with FoxP2.A:Gal4FF (see the ‘Single-cell FingR(PSD95) expression using electroporation’ section) were kept under a 14 h–10 h light–dark cycle until 7 d.p.f., then imaged at ZT4–ZT5 (see the ‘Repeated imaging of FingR-labelled synapses’ section). Larvae were transferred to individual wells of a six-well plate containing 10 ml of sleep-promoting drugs, alone or in combination, as follows: 30 µM melatonin (M5250, Sigma-Aldrich) in 0.02% DMSO; 30 µM of clonidine hydrochloride (C7897, Sigma-Aldrich) in 0.02% DMSO; 45 µM 2-chloroadenosine (C5134, Sigma-Aldrich) in 0.02% DMSO; and 0.02% DMSO in fish water as controls45,52,60,61. Combinations of drugs were applied at the same concentrations as the single-dose conditions, maintaining the final DMSO concentration of 0.02%. Sleep induction was monitored with video-tracking (see the ‘Locomotor activity assay’ section) for 5 h, after which the drugs were removed by 2–3 careful replacements of the fish water using a transfer pipette followed by transferring the larvae individually to a new six-well plate with fresh water. The larvae were then reimaged using the Airyscan system (see the ‘Repeated imaging of FingR-labelled synapses’ section).

Tectal cell segmentation and clustering

The morphology of tectal neurons at 7 d.p.f. was segmented and measured using Imaris v.8.0.2 (Bitplane) and ImageJ (NIH). The total filament length for each neuron was obtained using the Imaris Filament function. The anterior–posterior span of the distal arbour was calculated using the Measurement function at an orthogonal view in 3D. The relative proximal arbour locations were calculated by dividing the proximal arbour distance from the nucleus by the total length of the neuron obtained using Filament function of Imaris. The distance from the skin, distal arbour thickness and distal arbour to skin distance were obtained using the rectangle Plot_Profile tool of ImageJ at an orthogonal view of the neuron to calculate the fluorescence intensity across the tectal depth. The intensity profiles were then analysed using custom Python scripts to obtain the maximum width using area under the curve functions following published methods33,43.

Additional clustering and statistical analyses were performed using custom scripts written in Python (available at GitHub (https://github.com/anyasupp/single-neuron-synapse)). For segmentation clustering, six morphological features of FoxP2.A cells were standardized and reduced in dimensionality by projecting into principal component analysis space. The first four components, which explained 89% of the variance, were selected to use for clustering. These components were then clustered using k-means clustering with k ranging from 1 to 11. Using the elbow method, Calinski Harabasz coefficient and silhouette coefficient, we found k = 4 to be the optimal number of k clusters.

Puncta quantification and statistics

All image files of synapse tracking experiments were blinded by an independent researcher before segmentation and puncta quantification. To count the number of FingR(PSD95)–GFP puncta, each neuron’s morphology was first segmented using the Filament function in Imaris v.8.0.2 (Bitplane). FingR(PSD95)–GFP puncta were labelled using the Spots function, thresholded using the Quality classification function at approximately 130–200 depending on the image file. The number and location of GFP puncta were also manually checked for accuracy. FingR(PSD95)–GFP puncta lying on the FingR+ neuron (mKate2f red channel) were extracted using the Find Spots Close to Filament XTension add-on in IMARIS.

The percentage changes in synapse number and intensity were calculated using the following formula:

$$\Delta ( \% )=\left(\frac{x-{x}_{t-1}}{{x}_{t-1}}\right)\times 100,$$

Where x represents either synapse number or intensity and xt − 1 is the respective synapse number or intensity at the previous timepoint. Statistical tests were implemented using Python62. Values in the figures represent the average ± 68% CI unless stated otherwise.

Synapse intensity was calculated using the ratio of the normalized average FingR(PSD95)–GFP intensity and mKate2f, to account for depth-dependent signal reduction63. First, the average FingR(PSD95)–GFP and mKate2f (cell morphology) intensities at the same location within the neuron were extracted using the Imaris Spots function. Next, these average intensity values were normalized to their respective channel maximum and minimum value to account for larval position inconsistencies between imaging as follows:

$${\rm{Normalized}}\,{\rm{mean}}\,{\rm{intensity}}=\frac{{\rm{Average}}\,{\rm{intensity}}-{{\rm{Channel}}}_{\min }}{{{\rm{Channel}}}_{\max }-{{\rm{Channel}}}_{\min }}.$$

Depth-dependent signal reduction was corrected by calculating the FingR(PSD95)–GFP:mKate2f ratio as follows:

$${\rm{Normalized}}\,{\rm{mean}}\,{\rm{puncta}}\,{\rm{intensity}}=\frac{{\rm{Normalized}}\,{\rm{mean}}\,{\rm{GFP}}}{{\rm{Normalized}}\,{\rm{mean}}\,{\rm{mKate2f}}}.$$

Before statistical analysis, all datasets were tested for normality using the Shapiro–Wilk test followed by direct visual inspection of QQ plots. For repeated-measures design, the data were first tested for sphericity using Mauchly’s test; repeated-measures or mixed ANOVAs were then performed, corrected with Greenhouse–Geisser correction when sphericity was violated, followed by post hoc t-tests corrected with Benjamini–Hochberg correction for multiple comparisons. For multiple-sample comparisons, equal variances were tested using Levene’s tests. If variances were equal, either one-way ANOVA (multiple groups) with post hoc Benjamini–Hochberg correction or Student’s t-tests (two groups) were performed to test for significant differences. If variances were unequal, Kruskal–Wallis (multiple groups) with Dunn’s multiple-comparison correction or Mann–Whitney U-tests (two groups) were performed to test for significant differences. All of the statistical analyses performed are provided in Supplementary Data 1.

per3 circadian rhythm bioluminescence assay

Larvae (6 d.p.f.) from a Tg(per3:luc)g1;Tg(elavl3:EGFP)knu3 incross were individually placed into wells of 24-well plates in water containing 0.5 mM beetle luciferin (Promega). From ZT14 (the light to dark transition) the next day, half of the larvae were subjected to a sleep deprivation paradigm (see the ‘Sleep deprivation assay’ section) under dim red light, while the others were left undisturbed in similar lighting conditions. At the end of the 4 h sleep deprivation period, the larvae were individually transferred to the wells of a white-walled 96-round-well plate (Greiner Bio-One) and sealed with an oxygen-permeable plate-seal (Applied Biosystems). Bioluminescence photon counts, reflecting luciferase expression driven by the per3 promoter, were sampled every 10 min for three consecutive days, in constant dark at 28 °C, using the TopCount NXT scintillation counter (Packard).

HCR fluorescence in situ hybridization

FoxP2.A neurons were sparsely labelled with GFP by co-electroporating wild-type AB larvae with FoxP2.A:Gal4FF and UAS:eGFP1 at 500 ng µl−1 each (see the ‘Single-cell FingR(PSD95) expression using electroporation’ section). Whole-mount hybridization chain reaction (HCR) was performed on larvae with FoxP2.A neurons positive for GFP at 7 d.p.f. using an adapted protocol from a previous study64. In brief, larvae were fixed with 4% PFA and 4% sucrose overnight at 4 °C. The next day, the larvae were washed with PBS to stop fixation and the brains were removed by dissection. The dissected specimens were permeabilized using proteinase K (30 µg ml−1) for 20 min at room temperature, then washed twice in PBS with 0.1% Tween-20 (PBST), before being post-fixed in 4% PFA for 20 min at room temperature. The larvae were then washed in 0.1% PBST and prehybridized with prewarmed HCR hybridization buffer (Molecular Instruments) for 30 min at 37 °C.

Probes targeting multiple genes associated with different types of adenosine or adrenergic receptors were combined and labelled to the same hairpins. For example, probes detecting adora1a-b (encoding adenosine receptor A1a and A1b) contain initiators that correspond with hairpins (B3) labelled with Alexa 546 fluorophore, whereas adora2aa, adora2ab and adora2b (encoding adenosine receptors A2aa, A2ab and A2b) contain initiators that correspond with hairpins (B5) labelled with Alexa 647 fluorophore (Supplementary Data 2). Probe solutions consisting of cocktails of HCR probes for each transcript (Thermo Fisher Scientific) were prepared with a final concentration of 24 nM per HCR probe in HCR hybridization buffer. The larvae were then incubated in probe solutions overnight at 37 °C. Excess probes were removed by washing larvae four times for 15 min with probe wash buffer (Molecular Instruments) at 37 °C followed by two 5 min washes of 5× SSCT buffer (5× sodium chloride sodium citrate and 0.1% Tween-20) at room temperature. Preamplification was performed by incubating the samples with amplification buffer (Molecular Instruments) for 30 min at room temperature. Hairpin h1 and hairpin h2 were prepared separately by snap-cooling 4 µl of 3 µM stock at 95 °C for 20 min and 20 °C for 20 min. The larvae were then incubated with h1 and h2 hairpins in 200 µL amplification buffer overnight in the dark at room temperature. Excess hairpins were washed thoroughly the next day twice for 5 min and three times for 30 min with 5× SSCT at room temperature. The specimens were then imaged using a ×20 water-immersion objective and the LSM 980 confocal microscope with Airyscan 2 (Zeiss). The endogenous GFP signal from FoxP2.A was visualized without amplification.

Reporting summary

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