⌑ The Labs HQ
Performance Lab·The Codex·Sleep Architecture
⌑ Codex Protocol · Sleep · Foundational

Sleep Architecture.

7-9 hr · N1 · N2 · N3 (deep) · REM · ~90 min cycles

The single highest-leverage recovery intervention. Not just duration — architecture. Deep sleep drives growth hormone and glymphatic clearance. REM drives memory consolidation and emotional regulation. Fragment either one and every other protocol in the Codex degrades in effect.

⌑ Duration
7-9 hr
most adults · genetically short-sleepers rare
⌑ Deep Sleep (N3)
60-100 min
growth hormone · glymphatic clearance
⌑ REM Sleep
90-120 min
memory · emotional regulation
⌑ Consistency
±30 min
bedtime/wake time · every day

⌑ I · The MechanismHow it actually works.

Sleep is not a single state — it's a structured sequence of four distinct phases cycling every 90 minutes across the night. Each phase serves a different biological function, and losing any one of them produces measurable downstream deficits regardless of total sleep duration.[1]

The four phases

N1 (light sleep, ~5%): the transitional phase between wakefulness and sleep. Muscle tone drops, breathing slows, awareness fades. Duration measured in minutes per cycle.

N2 (light sleep, ~45-55%): the largest single phase. Sleep spindles and K-complexes appear on EEG. Body temperature drops, heart rate slows. Contributes to motor memory consolidation and general recovery.

N3 (deep sleep / slow-wave sleep, ~15-25%): the most physically restorative phase. Growth hormone surges (~70% of daily GH release occurs here). Glymphatic clearance — the brain's waste removal system — runs at 2x waking rate, clearing beta-amyloid, tau, and other neurotoxic byproducts. Concentrated in the first third of the night.[2]

REM (dreaming sleep, ~20-25%): paradoxical state. Brain activity resembles wakefulness; body is atonic (paralyzed). Memory consolidation, emotional regulation, and creative pattern-matching happen here. Concentrated in the last third of the night — cutting sleep short by 90 minutes disproportionately deletes REM.[3]

⌑ Mechanism Note · Why Duration Alone Fails

A person who sleeps 8 hours but wakes 4 times, drinks alcohol, or takes benzodiazepines has "8 hours of sleep" that contains almost no deep sleep or REM. The polysomnogram will show N1 and N2 dominance with fragmented architecture. This is why fitness trackers measuring only duration systematically overstate sleep quality — and why simply "sleeping more" doesn't produce the expected benefits when architecture is destroyed.

⌑ II · The EvidenceWhat the research actually shows.

⌑ III · The ProtocolWhat actually works.

⌑ Foundation Protocol · Non-Negotiables

Duration target

7-9 hours of actual sleep opportunity. Time in bed must exceed target sleep time (accounting for sleep latency and normal awakenings). A person who needs 8 hours of sleep should be in bed 8.5+ hours.[4]

Consistency

Sleep onset and wake time within ±30 minutes daily, including weekends. Chronic weekend shift (a.k.a. "social jetlag") produces measurable metabolic dysregulation even when total sleep is preserved.[10]

Light environment

Bright light exposure in the first 30 minutes of waking (ideally sunlight, minimum 10,000 lux) anchors the circadian rhythm and drives evening melatonin release ~14-16 hours later. Light avoidance in the 2-3 hours before bed — particularly blue-enriched light > 100 lux — preserves melatonin onset.[11]

Room temperature

Cool bedroom (60-67°F / 15-19°C). Sleep onset requires core body temperature to drop; warm environments delay sleep onset and reduce deep sleep percentage. This is the single most manipulable variable for sleep quality.[12]

Caffeine timing

Half-life 5-6 hours, quarter-life 10-12 hours. Caffeine consumed after ~2 PM measurably reduces deep sleep percentage even when subjective sleep onset feels normal. See the caffeine protocol for the decay curve.

Alcohol

Sedates for the first half of the night, fragments the second half. Chronic use suppresses REM sleep specifically. No dose has been shown to improve sleep architecture; all evidence points the other direction.[13]

⌑ IV · OptimizationBeyond the foundation.

Wind-down routine

60-90 minutes of dim light, low-arousal activity before intended sleep. Reading, low-intensity conversation, warm showers (which paradoxically COOL the body core through peripheral vasodilation). Screens are compatible if brightness is minimized and content is not emotionally activating.

Sleep tracking — informational, not prescriptive

Wearables (Oura, Whoop, Apple Watch, Garmin) estimate sleep stages from heart rate variability and movement. These estimates correlate roughly with polysomnography for duration and light/deep proportion but are unreliable for REM staging. Use tracker data to identify TRENDS (better/worse across weeks), not to make sleep decisions based on individual nightly scores.[14]

Magnesium (glycinate)

The only supplement with reasonable clinical evidence for sleep support in most populations. Glycine (the ligand in glycinate form) has independent sedative-hypnotic effects. Standard dose 200-400 mg 60-90 min before bed. See the magnesium protocol.

Melatonin — dose and timing matter

Endogenous nightly release is approximately 0.3 mg. Supplemental doses of 5-10 mg (the standard OTC format) are dramatically supraphysiological. Emerging evidence supports LOWER doses (0.3-1 mg) taken 4-5 hours before intended sleep to shift circadian phase in jet lag or shift work. Higher doses used as "sleeping pills" are less effective than marketed and can produce next-day grogginess.[15]

Cognitive Behavioral Therapy for Insomnia (CBT-I)

For chronic insomnia, CBT-I has stronger long-term efficacy than any sleep medication. Meta-analyses consistently show sustained improvement 6-12 months post-treatment vs medication response that ends when medication ends. First-line treatment per most sleep medicine guidelines.[16]

⌑ V · When to InvestigateSleep pathology.

⌑ Practical Note

Every other protocol in the Codex — creatine, testosterone optimization, protein intake, training frequency, longevity compounds — becomes less effective when sleep is compromised. Sleep is not one lever among many. It is the substrate through which every other lever works. Fix this before optimizing anything else.

⌑ VI · ReferencesPrimary sources.

  1. Walker MP. Why We Sleep: Unlocking the Power of Sleep and Dreams. Scribner; 2017. (Cited for canonical explanation of sleep phases; underlying studies referenced individually.)
  2. Xie L, Kang H, Xu Q, et al. Sleep drives metabolite clearance from the adult brain. Science. 2013;342(6156):373-377. PMID: 24136970
  3. Rasch B, Born J. About sleep's role in memory. Physiological Reviews. 2013;93(2):681-766. PMID: 23589831
  4. Cappuccio FP, D'Elia L, Strazzullo P, Miller MA. Sleep duration and all-cause mortality: a systematic review and meta-analysis of prospective studies. Sleep. 2010;33(5):585-592. PMID: 20469800
  5. Cappuccio FP, Cooper D, D'Elia L, Strazzullo P, Miller MA. Sleep duration predicts cardiovascular outcomes: a systematic review and meta-analysis of prospective studies. European Heart Journal. 2011;32(12):1484-1492. PMID: 21300732
  6. Leproult R, Van Cauter E. Effect of 1 week of sleep restriction on testosterone levels in young healthy men. JAMA. 2011;305(21):2173-2174. PMID: 21632481
  7. Buxton OM, Pavlova M, Reid EW, Wang W, Simonson DC, Adler GK. Sleep restriction for 1 week reduces insulin sensitivity in healthy men. Diabetes. 2010;59(9):2126-2133. PMID: 20585000
  8. Prather AA, Janicki-Deverts D, Hall MH, Cohen S. Behaviorally assessed sleep and susceptibility to the common cold. Sleep. 2015;38(9):1353-1359. PMID: 26118561
  9. Fullagar HH, Skorski S, Duffield R, et al. Sleep and athletic performance: the effects of sleep loss on exercise performance, and physiological and cognitive responses to exercise. Sports Medicine. 2015;45(2):161-186. PMID: 25315456
  10. Wittmann M, Dinich J, Merrow M, Roenneberg T. Social jetlag: misalignment of biological and social time. Chronobiology International. 2006;23(1-2):497-509. PMID: 16687322
  11. Gooley JJ, Chamberlain K, Smith KA, et al. Exposure to room light before bedtime suppresses melatonin onset and shortens melatonin duration in humans. Journal of Clinical Endocrinology & Metabolism. 2011;96(3):E463-E472. PMID: 21193540
  12. Okamoto-Mizuno K, Mizuno K. Effects of thermal environment on sleep and circadian rhythm. Journal of Physiological Anthropology. 2012;31(1):14. PMID: 22738673
  13. Ebrahim IO, Shapiro CM, Williams AJ, Fenwick PB. Alcohol and sleep I: effects on normal sleep. Alcoholism: Clinical and Experimental Research. 2013;37(4):539-549. PMID: 23347102
  14. de Zambotti M, Rosas L, Colrain IM, Baker FC. The sleep of the ring: comparison of the ŌURA sleep tracker against polysomnography. Behavioral Sleep Medicine. 2019;17(2):124-136. PMID: 28323455
  15. Zhdanova IV, Wurtman RJ, Regan MM, et al. Melatonin treatment for age-related insomnia. Journal of Clinical Endocrinology & Metabolism. 2001;86(10):4727-4730. PMID: 11600532
  16. Trauer JM, Qian MY, Doyle JS, Rajaratnam SM, Cunnington D. Cognitive behavioral therapy for chronic insomnia: a systematic review and meta-analysis. Annals of Internal Medicine. 2015;163(3):191-204. PMID: 26054060
  17. Peppard PE, Young T, Barnet JH, Palta M, Hagen EW, Hla KM. Increased prevalence of sleep-disordered breathing in adults. American Journal of Epidemiology. 2013;177(9):1006-1014. PMID: 23589584
← Back to the Codex