Home/Sleep/Matthew Walker/Caffeine & Sleep

Caffeine & Sleep

Matthew Walker's caffeine rule is a curfew: stop about 8 to 10 hours before bed, because caffeine lingers far longer than you feel it. This is his stated practical position rather than a trial result. For what sleep labs have measured directly across doses and timings, see our caffeine and sleep explainer.

BeginnerSleepSleep Debt
Not endorsed · based on the published work of Matthew Walker
At a glance
Time
Daily
Steps
6
Difficulty
Beginner
Caffeine's half-life averages about 5 hours, but it varies widely between people, from about 1.5 to 9.5 hours, so the same afternoon coffee can be gone by bedtime for one person and still working for another.
The protocol
Understand
Know caffeine's real timeline Mean half-life about 5 hours, but it ranges from 1.5 to 9.5 hours between people

If your own half-life sits at the long end of that range, a coffee at noon can still be working at midnight. Caffeine outstays its welcome by hours, and by a different number of hours for each person.

Matthew Walker
Curfew
Set a caffeine curfew Stop ~8 to 10 hours before bed (early afternoon for most)

This keeps the lingering quarter-life from eating into your night. If you go to bed around 10:30pm, that means last caffeine around midday to early afternoon.

Matthew Walker
Dose
Keep the dose modest and morning-only 1 to 3 cups, in the morning

Walker's rule of thumb: enjoy coffee, but front-load it and cap it. The dose and the timing make the poison.

Matthew Walker
Swap
Switch the afternoon cup to decaf Decaf or half-caf after your curfew

Walker notes the health benefits of coffee come largely from its antioxidants, not the caffeine, and decaf keeps most of those. It lets you keep the ritual without the sleep cost.

Matthew Walker
In your stack: Decaf coffee
Mindset
Don't trust 'I sleep fine on coffee' Judge deep sleep, not just falling asleep

Many people fall asleep after an evening coffee but still lose deep sleep quality. Sleeping through is not the same as sleeping well.

Matthew Walker
Break cycle
Break the caffeine dependency loop Fix timing first, then let morning need fall

Poor sleep drives more coffee, which degrades the next night, which drives more coffee. Fixing the timing breaks the loop at its source.

Matthew Walker
The evidence 5

Caffeine's half-life averages about 5 hours, but it varies widely between people, from about 1.5 to 9.5 hours, so the same afternoon coffee can be gone by bedtime for one person and still working for another.

View sources
The Matt Walker Podcast: Sleep & Caffeine Listen themattwalkerpodcast.buzzsprout.com
Matthew Walker (MasterClass): the buzz on caffeine & alcohol Read masterclass.com
Caffeine for the Sustainment of Mental Task Performance (Institute of Medicine, National Academies Press, 2001) Read National Academies Press, NCBI Bookshelf NBK223808
Dose and Timing Effects of Caffeine on Subsequent Sleep: a Randomized Clinical Crossover Trial (Gardiner et al., Sleep, 2025) Read Sleep, 2025;48(4):zsae230
The Effect of Caffeine on Subsequent Sleep: a Systematic Review and Meta-analysis (Gardiner et al., Sleep Medicine Reviews, 2023) Read Sleep Medicine Reviews, 2023;69:101764

Not medical advice. This page is for education only and is not a substitute for professional medical care. Consult a qualified clinician before changing your health routine.
Independent curation. YourProtocol is an independent platform. This protocol is based on the publicly available work of Matthew Walker and is not created, reviewed, endorsed by, or affiliated with Matthew Walker or UC Berkeley.

Is this for you
  • Afternoon coffee drinkers who don't fall asleep well
  • People who 'sleep fine' on caffeine but wake unrefreshed
  • Anyone stuck in the more-coffee, worse-sleep loop
  • Ritual lovers who want to keep the cup without the cost
Cautions
  • Caffeine sensitivity varies widely between people, and the measured half-life ranges from 1.5 to 9.5 hours, so some people need a much earlier curfew than others. How much of that variation is genetic is not settled: for sleep specifically, the two largest genetic studies did not find the CYP1A2 link that consumer gene tests sell.
  • Don't quit caffeine abruptly if you drink a lot; taper to avoid headaches.
  • This is about sleep quality, not a medical claim; if you have a heart or anxiety condition, follow your physician's caffeine guidance.
  • Educational only, not medical advice.
You'll also need
  • Cafe Don Pablo
Get the next protocol first
Evidence updates, cited to the source. No spam.