5D Library › Two-Process Sleep Architecture, Slow-Wave Glymphatic Clearance and Thermoregulatory Phase Control · 中文

Chapter 2. The Sleep Switch: Why Ageing Fragments the Night Before It Shortens It

A switch, not a dimmer

Process S and Process C say when sleep should begin; they do not say how the brain makes the change. Saper and colleagues proposed that it is made by two groups of neurons that inhibit each other: sleep-active cells in the ventrolateral preoptic nucleus (VLPO) of the hypothalamus, and the wake-promoting monoaminergic cell groups of the brainstem and hypothalamus (Saper et al. 2001, 2010). Mutual inhibition makes a flip-flop: whichever side is active silences the other, so the system rests in one of two states and passes quickly between them, with little time in between. Orexin (hypocretin) neurons in the lateral hypothalamus excite the wake side and are proposed to stabilise it — a finger on the switch.

The proposal makes a sharp prediction about what happens when the switch weakens. It should not mainly change how much we sleep; it should change how stably we stay in each state.

Calculation

The model. With xx the sleep-active and yy the wake-active population (both scaled 0 to 1), dxdt=−x+f(c+D−wy),\frac{dx}{dt} = -x + f(c + D – w\,y), dydt=−y+f(c−D−wx+Oy),\frac{dy}{dt} = -y + f(c – D – w\,x + O\,y), where f(u)=1/(1+e−u/0.1)f(u) = 1/(1+e^{-u/0.1}), c=0.5c = 0.5 is tonic excitation, DD is the net drive toward sleep (from Processes S and C), ww is the strength of the mutual inhibition and OO is orexin’s reinforcement of the wake side while it is active.

How much margin the switch has

The third program asks, for each strength of mutual inhibition, over what range of drive the switch is bistable — able to hold either state, so that small changes in drive do not flip it.

Calculation

# Chapter 2. The sleep switch as two mutually inhibiting populations (a
# minimal "flip- flop" in the sense of Saper and colleagues). x = sleep-active
# VLPO population, y = wake- active monoaminergic population, both scaled
# 0..1:
#   dx/dt = -x + f(c + D - w y)
#   dy/dt = -y + f(c - D - w x + O y)
# c = 0.5 is tonic excitation, D is the net drive toward sleep (homeostatic
# minus circadian), w is the strength of the mutual inhibition, O is orexin's
# reinforcement of the wake side while it is active, and f(u) = 1 / (1 +
# exp(-u / 0.1)). For each D on a grid (step 0.005) we let the network settle
# from a wake start and from a sleep start. Where the two settle to different
# states the switch is bistable: it holds whichever state it is in. The range
# of D over which that is true is the switch's margin against changes in
# drive.
import math

def f(u):
    return 1.0 / (1.0 + math.exp(-u / 0.1))

def settle(D, w, O, x, y, steps=4000, dt=0.02):
    for _ in range(steps):
        dx = -x + f(0.5 + D - w * y)
        dy = -y + f(0.5 - D - w * x + O * y)
        x += dt * dx
        y += dt * dy
    return x, y

def bistable_range(w, O):
    lo = hi = None
    for i in range(-400, 401):
        D = 0.005 * i
        xa, ya = settle(D, w, O, 0.0, 1.0)
        xb, yb = settle(D, w, O, 1.0, 0.0)
        if abs(xa - xb) > 0.5:
            lo = D if lo is None else lo
            hi = D
    return lo, hi

if __name__ == "__main__":
    print("Range of sleep drive D over which the switch is bistable")
    print(
        "   inhibition w   orexin O   bistable from D   to D      margin"
        " (width)"
    )
    for O in (0.0, 0.3):
        for w in (1.5, 1.0, 0.7, 0.5, 0.3):
            lo, hi = bistable_range(w, O)
            if lo is None:
                print(
                    "   {:8.1f}       {:5.1f}       none: one state only     "
                    "      0.000".format(w, O)
                )
            else:
                print(
                    "   {:8.1f}       {:5.1f}       {:+8.3f}        {:+8.3f} "
                    "   {:7.3f}".format(w, O, lo, hi, hi - lo + 0.005)
                )
    print(
        "\nReading: strong mutual inhibition gives a wide margin; weakening"
        " it (as with"
    )
    print(
        "loss of VLPO neurons) narrows the margin until the switch no longer"
        " holds a"
    )
    print(
        "state at all. Orexin moves the margin toward higher sleep drive: the"
        " wake"
    )
    print(
        "state needs more pressure to give way. Without it, wake gives way"
        " sooner."
    )
# Range of sleep drive D over which the switch is bistable
#    inhibition w   orexin O   bistable from D   to D      margin (width)
#         1.5         0.0         -0.325          +0.325      0.655
#         1.0         0.0         -0.180          +0.180      0.365
#         0.7         0.0         -0.055          +0.055      0.115
#         0.5         0.0       none: one state only           0.000
#         0.3         0.0       none: one state only           0.000
#         1.5         0.3         -0.320          +0.505      0.830
#         1.0         0.3         -0.160          +0.300      0.465
#         0.7         0.3         +0.010          +0.155      0.150
#         0.5         0.3       none: one state only           0.000
#         0.3         0.3       none: one state only           0.000
#
# Reading: strong mutual inhibition gives a wide margin; weakening it (as with
# loss of VLPO neurons) narrows the margin until the switch no longer holds a
# state at all. Orexin moves the margin toward higher sleep drive: the wake
# state needs more pressure to give way. Without it, wake gives way sooner.

With strong inhibition (w=1.5w = 1.5) the switch holds either state for drive anywhere between −0.325 and +0.325, a margin of 0.655. Weakening the inhibition shrinks the margin quickly: 0.365 at w=1.0w = 1.0, 0.115 at w=0.7w = 0.7, and at w=0.5w = 0.5 the switch is no longer a switch at all — there is only one state for each level of drive, and the system slides between “asleep” and “awake” as the drive changes.

Orexin changes the shape of the margin, not just its size. With O=0.3O = 0.3 the upper end moves from +0.325 to +0.505: the wake state needs much more sleep drive before it gives way, while the lower end barely moves (−0.320). That is the “finger on the switch”: orexin defends wakefulness.

Noise, and the fragmented night

A real switch is noisy. The fourth program runs the switch through an 8-hour night with the sleep drive falling as Process S decays, and adds noise to each population.

Calculation

# Chapter 2. The same switch with noise, over one 8-hour night. Sleep drive is
# high at lights-out and falls through the night as Process S decays: D(t) =
# 0.45 x exp(-t/4.2)
# - 0.05 (t in hours). Each population receives independent noise
#   (Ornstein-Uhlenbeck,
# sd 0.12, correlation time 30 s). "Asleep" means x > y. A wake bout of at
# least 15 s counts as an awakening. Weaker mutual inhibition w stands for
# loss of VLPO neurons. 200 simulated nights per row, fixed seed; dt = 1 s.
import math
import random

def f(u):
    return 1.0 / (1.0 + math.exp(-u / 0.1))

def night(w, O, rng, sd=0.12, tau_n=30.0, tau=10.0):
    x, y = 1.0, 0.0
    nx = ny = 0.0
    a = math.exp(-1.0 / tau_n)
    b = sd * math.sqrt(1 - a * a)
    asleep_s, awakenings, wake_run, state = 0, 0, 0, True
    for s in range(8 * 3600):
        t = s / 3600.0
        D = 0.45 * math.exp(-t / 4.2) - 0.05
        nx = a * nx + b * rng.gauss(0, 1)
        ny = a * ny + b * rng.gauss(0, 1)
        x += (-x + f(0.5 + D - w * y + nx)) / tau
        y += (-y + f(0.5 - D - w * x + O * y + ny)) / tau
        if x > y:
            asleep_s += 1
            if not state and wake_run >= 15:
                awakenings += 1
            state, wake_run = True, 0
        else:
            state = False
            wake_run += 1
    return asleep_s / (8 * 3600), awakenings

if __name__ == "__main__":
    rng = random.Random(57004)
    print("   mean of 200 nights")
    print("   inhibition w   orexin O   time asleep   awakenings per night")
    for O in (0.3, 0.0):
        for w in (1.5, 1.0, 0.7, 0.5):
            res = [night(w, O, rng) for _ in range(200)]
            fa = sum(r[0] for r in res) / len(res)
            aw = sum(r[1] for r in res) / len(res)
            print(
                "   {:8.1f}       {:5.1f}       {:7.3f}          {:7.2f}"
                .format(w, O, fa, aw)
            )
    print("\nReading (orexin O = 0 rows): weakening the"
          " mutual inhibition from 1.0 to")
    print("0.5 costs less than a tenth of the time asleep but multiplies the")
    print("awakenings - the night fragments long before"
          " it shortens. With orexin left")
    print("active at night (O = 0.3 rows) the wake side"
          " is held too firmly and sleep")
    print("is lost outright.")
#    mean of 200 nights
#    inhibition w   orexin O   time asleep   awakenings per night
#         1.5         0.3         1.000             0.00
#         1.0         0.3         0.933             0.01
#         0.7         0.3         0.640            13.29
#         0.5         0.3         0.546            59.19
#         1.5         0.0         1.000             0.00
#         1.0         0.0         0.989             0.12
#         0.7         0.0         0.938            10.61
#         0.5         0.0         0.908            35.40
#
# Reading (orexin O = 0 rows): weakening the mutual inhibition from 1.0 to
# 0.5 costs less than a tenth of the time asleep but multiplies the
# awakenings - the night fragments long before it shortens. With orexin left
# active at night (O = 0.3 rows) the wake side is held too firmly and sleep
# is lost outright.

The rows without orexin (O=0O = 0, as when orexin neurons are quiet in sleep) contain the chapter’s main result. Weakening the mutual inhibition from 1.0 to 0.7 and 0.5 lowers the time asleep from 0.989 to 0.938 and 0.908 — less than a tenth — but raises the awakenings per night from 0.12 to 10.61 and 35.40. The night fragments long before it shortens. That is the pattern of sleep in older adults: total sleep time falls modestly, while awakenings after sleep onset and stage shifts rise markedly (Ohayon et al. 2004).

The rows with orexin left active at night (O=0.3O = 0.3) show the other side: with the wake side reinforced, a weakened switch loses sleep outright (0.640 and 0.546 of the night). In this model orexin’s job by night is to be off.

Margin of bistability (range of sleep drive over which the switch holds either state) against the strength of mutual inhibition, with and without orexin. Right: time asleep and awakenings per night in the noisy switch without orexin.

Evidence

What supports the switch picture. In older adults studied at autopsy after years of actigraphy, fewer neurons in the VLPO/intermediate nucleus were associated with more fragmented sleep (Lim et al. 2014). In human narcolepsy, most hypocretin (orexin) neurons are lost (Thannickal et al. 2000), and the disorder is marked by unstable states in both directions — sleep intruding into wake and wake into sleep — rather than simply by too much sleep. Conversely, drugs that block orexin receptors are used to treat insomnia, and in randomised trials improved sleep relative to placebo (Herring et al. 2016); mentioned here for the pharmacology, not as a recommendation.

Hypothesis · not established

The author’s hypothesis (not established): across healthy adults of different ages, the number of awakenings per hour of sleep rises more steeply with age than total sleep time falls, when both are expressed as a percentage of the youngest group’s value; and in individuals followed over years, increases in awakenings precede measurable decreases in total sleep. What would show it to be wrong: proportional changes of similar size, or total sleep falling first.

Summary

Sleep and wake are held by two mutually inhibiting populations, and mutual inhibition makes a switch with a margin: over a range of drive it holds whichever state it is in. Weakening the inhibition — as with the loss of VLPO neurons in ageing — shrinks the margin until the switch stops being a switch. With noise, that costs little total sleep but multiplies awakenings: in the model, from 0.12 to 35.40 a night while time asleep falls by less than a tenth. Orexin defends the wake state; at night, in this model, it needs to be off.

References

Herring, W. Joseph, Kathryn M. Connor, et al. 2016. “Suvorexant in Patients with Insomnia: Results from Two 3-Month Randomized Controlled Clinical Trials.” Biological Psychiatry 79 (2): 136–48.
Lim, Andrew S. P., Brian A. Ellison, et al. 2014. “Sleep Is Related to Neuron Numbers in the Ventrolateral Preoptic/Intermediate Nucleus in Older Adults with and without Alzheimer’s Disease.” Brain 137 (10): 2847–61.
Ohayon, Maurice M., Mary A. Carskadon, Christian Guilleminault, and Michael V. Vitiello. 2004. “Meta-Analysis of Quantitative Sleep Parameters from Childhood to Old Age in Healthy Individuals: Developing Normative Sleep Values across the Human Lifespan.” Sleep 27 (7): 1255–73.
Saper, Clifford B., Thomas C. Chou, and Thomas E. Scammell. 2001. “The Sleep Switch: Hypothalamic Control of Sleep and Wakefulness.” Trends in Neurosciences 24 (12): 726–31.
Saper, Clifford B., Patrick M. Fuller, Nigel P. Pedersen, Jun Lu, and Thomas E. Scammell. 2010. “Sleep State Switching.” Neuron 68 (6): 1023–42.
Thannickal, Thomas C., Robert Y. Moore, et al. 2000. “Reduced Number of Hypocretin Neurons in Human Narcolepsy.” Neuron 27 (3): 469–74.

Fan, Y. (2026). Two-Process Sleep Architecture, Slow-Wave Glymphatic Clearance and Thermoregulatory Phase Control: Adenosine Homeostasis, Flip-Flop Switch Bistability, Core-Distal Heat Flux and Sleep-Stage Markov Chains [双过程睡眠架构、慢波胶质淋巴清除与体温节律相位控制] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090162 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).