The Biology of Sleep: Melatonin, Adenosine, Cortisol, and More
Key Takeaways
- Sleep is driven by two interacting systems: the circadian clock and homeostatic sleep pressure (adenosine)
- Adenosine accumulates while you're awake; caffeine masks it but doesn't clear it
- Melatonin signals darkness β it's a timing molecule, not a sedative
- Cortisol promotes wakefulness; its failure to drop at night is a major driver of insomnia
- Orexin/hypocretin stabilizes wakefulness; its loss causes narcolepsy
Sleep looks passive from the outside, but inside the brain, it's driven by a complex interplay of neurotransmitters, hormones, and electrical activity that is only beginning to be fully understood. Knowing the key players β and what they actually do β has direct practical implications for how you sleep, what supplements you take, how caffeine affects you, and why stress keeps you awake.
The Two-Process Model of Sleep Regulation
The foundational framework for understanding sleep biology is the two-process model, proposed by Swiss sleep researcher Alexander BorbΓ©ly in 1982. It remains the dominant model of sleep regulation today.
Sleep timing and intensity are determined by the interaction of two independent processes:
- Process C β the circadian clock, driven by the suprachiasmatic nucleus (SCN) and its molecular clock genes. This creates alternating windows of sleep promotion and wake promotion over a 24-hour cycle, regardless of how long you've been awake.
- Process S β homeostatic sleep pressure, driven primarily by the accumulation of adenosine in the brain. This increases the longer you're awake and dissipates during sleep. It doesn't care what time of day it is β only how long you've been awake.
The two processes interact in a push-pull dynamic. In the morning after good sleep, Process S is near zero (sleep pressure dissipated) and Process C is driving wakefulness. By late evening, Process S has risen all day and Process C begins withdrawing its wake-promoting signal β together, they create the strong sleep drive that brings on sleep onset. During sleep, Process S dissipates while Process C continues its cycle, eventually beginning to promote wakefulness again near the end of the night.
Adenosine: The Sleep Pressure Molecule
Adenosine is a neuromodulator β a chemical that modulates neural activity β that accumulates throughout the day as a byproduct of metabolic activity in the brain. The more neural activity, the more adenosine is produced. Over the course of wakefulness, adenosine concentrations in key brain regions (particularly the basal forebrain, which is critical for sleep regulation) rise progressively, binding to adenosine receptors and inhibiting the neural activity that drives wakefulness.
This is what you experience as the feeling of fatigue or "cognitive fog" that builds over a long day. It's not a metaphor β it's a specific neurochemical process.
During sleep, adenosine is cleared from the brain. The biological mechanism is partly the glymphatic system (which flushes metabolic waste from the brain) and partly direct enzymatic breakdown. A full night of good sleep restores adenosine levels to near-baseline, explaining why you feel cognitively refreshed after sleep.
Caffeine: Blocking Adenosine Without Clearing It
Caffeine doesn't create alertness β it masks fatigue. Caffeine is an adenosine receptor antagonist: it occupies adenosine receptors without activating them, preventing adenosine from binding and exerting its sleep-promoting effects. While caffeine is occupying the receptors, adenosine continues to be produced and accumulates β waiting.
When caffeine is metabolized (its half-life is approximately 5β7 hours; a quarter remains in your system 10β14 hours later), adenosine rushes back onto its receptors β producing the "caffeine crash." This is also why people who drink coffee all day feel terrible when they stop: the adenosine has been building all day and hits suddenly when the caffeine clears.
The practical implication: caffeine can suppress the subjective experience of sleepiness even when objective cognitive performance is impaired by accumulated adenosine. You can feel more awake than you actually are. And cutting off caffeine too late in the day means that even after the drug clears, its disruption of sleep architecture (particularly N3 and REM) will degrade sleep quality regardless of how quickly you fall asleep.
Melatonin: The Darkness Signal
Melatonin is produced by the pineal gland in response to darkness, under the control of the SCN. It is the body's primary hormonal signal of nighttime β it doesn't cause sleep directly, but it tells the body's systems that darkness has arrived and initiates the cascade of changes associated with sleep preparation.
Endogenous melatonin levels in healthy adults are approximately 100β300 picograms per milliliter at peak (around 2β3am) and nearly undetectable during the day. Most commercial melatonin supplements contain 1β10mg β delivering doses 10β100 times higher than what the pineal gland actually produces.
What Melatonin Does Physiologically
- Signals to peripheral clocks (in the liver, gut, and other organs) that it's night β helping coordinate metabolic rhythms
- Has a mild hypothermic effect (contributes to the body temperature drop associated with sleep onset)
- Weakly inhibits cortisol production at night
- In the short term, has some mild sedative properties at pharmacological (supplemental) doses β but these are secondary to its timing function
When Melatonin Supplementation Is Appropriate
The evidence supports melatonin use for:
- Jet lag β taken at the target destination's sleep time, it helps advance or delay the clock
- Delayed sleep phase β taken 5β6 hours before target sleep onset to advance circadian timing
- Shift work β taken before day sleep to help shift workers sleep during daytime hours
- Children's sleep disorders β growing evidence for children with ADHD, autism, and other conditions associated with sleep difficulty
The evidence is much weaker for melatonin as a general sleep aid for typical insomnia in adults. If you can't sleep because of high cortisol, anxiety, or poor sleep hygiene, melatonin is unlikely to be the solution.
Cortisol: The Wakefulness Hormone
Cortisol, produced by the adrenal glands under direction from the hypothalamic-pituitary-adrenal (HPA) axis, is the body's primary stress hormone β but it's also a fundamental regulator of the sleep-wake cycle.
Cortisol follows a clear circadian pattern: it should be at its nadir (lowest point) around your habitual sleep time, rise during the first half of the night, and peak about 30β45 minutes after waking in the Cortisol Awakening Response (CAR). This morning peak mobilizes energy, primes the immune system, and sets the physiological tone for the day.
How Cortisol Disrupts Sleep
Elevated cortisol at night is one of the most common biological drivers of insomnia and poor sleep quality. Cortisol:
- Promotes alertness and arousal, directly opposing sleep initiation
- Increases core body temperature, working against the temperature drop needed for sleep
- Stimulates glucose production, keeping the body in a metabolically "ready" state incompatible with sleep
- Reduces melatonin production through cross-talk in the HPA axis
Chronic stress keeps the HPA axis chronically activated β producing elevated evening cortisol levels that make falling asleep and staying asleep much harder. This is why stress management is a legitimate sleep intervention, not just lifestyle advice.
Bright light at night also maintains elevated cortisol β another mechanism by which evening screen use disrupts sleep beyond the melatonin effect.
Orexin/Hypocretin: The Wakefulness Stabilizer
Orexin (also called hypocretin) is a neuropeptide produced by a small group of neurons in the lateral hypothalamus β approximately 10,000β20,000 cells total. Its primary function is to stabilize and maintain wakefulness by activating the brain's arousal systems and inhibiting sleep-promoting circuits.
The critical importance of orexin was revealed by the discovery of narcolepsy's mechanism: people with type 1 narcolepsy β characterized by sudden loss of muscle tone (cataplexy), excessive daytime sleepiness, and sleep paralysis β have lost 90β95% of their orexin-producing neurons, believed to be destroyed by an autoimmune process. Without orexin, the brain can't maintain stable wakefulness; it flips uncontrollably between waking and sleep states.
This discovery led to a class of drugs called dual orexin receptor antagonists (DORAs) β including suvorexant (Belsomra) and lemborexant (Dayvigo) β that block orexin receptors to promote sleep. These drugs represent a different mechanism than older sleep medications and are thought to produce sleep that is more architecturally similar to natural sleep. See our prescription sleep medications guide for more.
GABA: The Brain's Primary Brake
Gamma-aminobutyric acid (GABA) is the main inhibitory neurotransmitter in the central nervous system β it reduces neural excitability throughout the brain. GABA-releasing neurons in several key regions are activated during sleep, suppressing the arousal systems that maintain wakefulness.
The ventrolateral preoptic nucleus (VLPO) in the hypothalamus is a key sleep-promoting region that works primarily through GABA. When the VLPO is active (during sleep), it inhibits arousal-promoting neurons in the brainstem and hypothalamus β creating the "flip-flop switch" architecture that Clifford Saper and colleagues described: sleep and wakefulness mutually suppress each other, creating the sharp, relatively stable transitions between the two states.
GABA and Sleep Medications
Most sedative-hypnotic drugs work by enhancing GABA activity:
- Benzodiazepines (diazepam, temazepam) β bind to GABA-A receptors, enhancing GABA's inhibitory effects. They produce sedation, reduce sleep latency, and suppress N3 and REM
- Z-drugs (zolpidem/Ambien, zaleplon, eszopiclone) β also GABA-A modulators with more receptor selectivity, producing sedation with somewhat different side effect profiles
- Alcohol β also a GABA enhancer and NMDA glutamate antagonist, which explains its sedating effects in the first half of the night β and its rebound-activating effects in the second half as it's metabolized
GABA supplements are also sold commercially. The problem: dietary GABA has very poor blood-brain barrier penetration, making it unlikely to affect brain GABA levels meaningfully. The evidence for oral GABA supplements as sleep aids is thin.
Serotonin and Norepinephrine: The Arousal System
The brain's arousal system is driven by several neuromodulators that are active during wakefulness and suppressed during sleep:
- Norepinephrine (from the locus coeruleus) β promotes alertness and attention. Levels fall in NREM and reach near zero in REM β which is one reason why REM is thought to be important for emotional processing: the brain replays emotional memories in a low-norepinephrine (low-anxiety) chemical environment
- Serotonin (from the raphe nuclei) β promotes wakefulness; serotonin neurons are less active in NREM and virtually inactive in REM. This is one reason SSRIs (serotonin reuptake inhibitors) can suppress REM sleep
- Histamine (from the tuberomammillary nucleus) β strongly promotes wakefulness. Antihistamines (diphenhydramine, the active ingredient in most OTC sleep aids like Benadryl and ZzzQuil) work by blocking histamine receptors β which explains both their sedating effect and the reason they cause daytime grogginess and lose effectiveness quickly
- Acetylcholine β drives both REM sleep (high activity) and wakefulness; the pontine cholinergic neurons that trigger REM are regulated by the balance between acetylcholine and monoamines
Practical Implications
What This Means for Your Sleep
- Caffeine cutoff β given caffeine's 5β7 hour half-life, cutting off by 2pm protects sleep for most people. Those who are slow caffeine metabolizers (due to CYP1A2 gene variants) may need earlier cutoffs
- Melatonin supplementation β 0.5β1mg is a more physiologically appropriate dose than 5β10mg. Take it for timing (jet lag, shift work, circadian adjustment) rather than as a sedative
- Stress and cortisol β treating insomnia without addressing chronic stress is treating a symptom while ignoring the cause. Cortisol-lowering practices (mindfulness, exercise, CBT-I) directly address a key biological driver
- Antihistamine sleep aids β they work through histamine blockade, develop tolerance quickly (within 4 nights in most people), and produce next-day grogginess. They're appropriate for occasional use, not regular sleep assistance
- GABA supplements β the evidence is weak. L-theanine (which modulates GABA activity indirectly) has somewhat better evidence for reducing sleep latency in anxiety-related sleep difficulties
Frequently Asked Questions
Can you feel the adenosine building up during the day?
Yes β the growing sense of cognitive fatigue, reduced motivation, and increased desire to rest that builds over the course of a long day is partly a direct experience of adenosine accumulation. The "mid-afternoon slump" is both a circadian low point and a time of accumulated adenosine that hasn't been fully masked by morning caffeine.
Why does sleep deprivation increase appetite?
Multiple mechanisms. Adenosine itself stimulates appetite when it builds up excessively. Sleep deprivation reduces leptin (satiety hormone) and increases ghrelin (hunger hormone). Cortisol, elevated by sleep deprivation, increases cravings for high-calorie foods. And greater waking hours simply mean more opportunity for eating behavior.
Do sleep supplements like magnesium actually work?
Magnesium glycinate has the most credible evidence among common sleep supplements. Magnesium is a cofactor in GABA receptor activation and melatonin synthesis, and deficiency is common. It also acts as an NMDA receptor antagonist, which may contribute to reduced arousal. The evidence is moderate for reducing sleep onset time in people who are genuinely magnesium deficient. For those with adequate magnesium, the effect is smaller.
Medical Disclaimer: Content on this page is for educational purposes only. Information about medications and supplements does not constitute medical advice. Consult a healthcare provider before starting any sleep medication or supplement.