How Late Can You Drink Coffee Before Bed?
What the sleep lab actually measured about late caffeine: the dose is the variable, your half-life is a range and not a number, and two of the most repeated claims about caffeine and sleep do not hold.
Stop treating 5 hours as your personal number
Why ↓
Every tidy cutoff rule you have read silently assumes one shared half-life. The spread is the reason those rules disagree with each other and with people's experience. EVIDENCE TIER A.
Compare the two doses before you compare the two times
Why ↓
Same people, same clock positions, opposite outcomes depending only on the dose. Note also that 400 mg still cost something at twelve hours out, so this is not an argument that timing is irrelevant. EVIDENCE TIER B: one crossover trial, n=23, and the participants were all men, so it has not been tested this way in women.
Judge caffeine by what is measured, not by whether you felt it
Why ↓
The gap between the electrodes and the diary is the practical point: people under-report what a large late dose costs them. EVIDENCE TIER B: n=12. DISCLOSURE: this study was funded by an investigator-initiated grant from Zeo Inc, whose sleep-monitoring headband was used, and a co-author was Zeo's Vice President of Scientific Affairs. We think the finding stands, and you should know who paid for it.
Know the typical cost across studies
Why ↓
This is the best summary figure available, and it is also where the widely shared "stop 8.8 hours before bed" line comes from. That figure is an extrapolation from a meta-regression, not a condition anyone tested, and the same lead author's 2025 trial found 100 mg late did nothing measurable. Treat 8.8 hours as an illustration, not a rule. EVIDENCE TIER A for the pooled effect; the 8.8 hour cutoff is deliberately not published here as a rule.
Estimate your real load before you change your timing
Why ↓
A more than twofold swing in the same drink from the same place, across six days. If you are aiming at a dose, a large takeaway coffee or a scooped pre-workout is a guess, not a measurement. EVIDENCE TIER A.
Understand the mechanism, so the dose logic makes sense
Why ↓
Receptor occupancy is dose dependent, which is the mechanistic reason a small late dose can be unremarkable while a large one is not. EVIDENCE TIER A.
Treat the CYP1A2 gene claim for sleep as unproven
Why ↓
The claim that CYP1A2 slow metabolisers get worse sleep from caffeine is sold hard by consumer genetics marketing, and the two biggest sleep-specific tests are negative. If genetics matters here at all, the signal so far is at the receptor, not the liver enzyme. EVIDENCE TIER A for the null findings.
Judge caffeine by the dose currently in you
Why ↓
People are often told caffeine borrows sleep pressure and that a rebound night pays it back. Nobody has measured that event. The honest version is simpler: the effect tracks the dose currently in you. EVIDENCE TIER A for the absence of evidence, B for the null result (n=20, men only).
Find your largest dose of the day, not your first one
Why ↓
Dose is the variable the trials moved, and the biggest dose is the one most likely to be doing something. Logging sleep onset rather than bedtime is what makes the change visible to you, given how badly self-report tracked the objective loss in the Drake data.
Caffeine works by blocking adenosine, the molecule that builds sleep pressure through the day; of caffeine's known biochemical actions, only adenosine receptor inhibition happens at normal human consumption.
Caffeine for the Sustainment of Mental Task Performance (Institute of Medicine, National Academies Press, 2001)
Dose and Timing Effects of Caffeine on Subsequent Sleep: a Randomized Clinical Crossover Trial (Gardiner et al., Sleep, 2025)
Caffeine Effects on Sleep Taken 0, 3, or 6 Hours Before Going to Bed (Drake et al., J Clin Sleep Med, 2013)
The Effect of Caffeine on Subsequent Sleep: a Systematic Review and Meta-analysis (Gardiner et al., Sleep Medicine Reviews, 2023)
Caffeine Content of Specialty Coffees (McCusker, Goldberger & Cone, J Anal Toxicol, 2003)
Adenosine, Caffeine, and Sleep-Wake Regulation (Reichert, Deboer & Landolt, J Sleep Res, 2022)
Actions of Caffeine in the Brain (Fredholm et al., Pharmacological Reviews, 1999)
A Genome-wide Association Study of Caffeine-Related Sleep Disturbance (Byrne et al., Sleep, 2012)
Caffeine Consumption, Genetic Variation and Sleep in Adolescents (Jessel et al., Genes, 2023)
Caffeine-Dependent Changes of Sleep-Wake Regulation (Weibel et al., Scientific Reports, 2021)
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.
Editorial disclosure. This protocol is written and fact-checked by the YourProtocol editorial team directly from the primary sources cited below; it is not written or reviewed by any outside expert.
Is this for you
- Anyone who has been told to stop caffeine at a fixed hour and found it did not help
- Big-serve coffee, energy drink and pre-workout users
- People who fall asleep fine after caffeine and still wake unrefreshed
- Anyone sold a caffeine gene test
Cautions
- Caffeine timing is about sleep quality, not a medical claim; if you have a heart, blood-pressure or anxiety condition, follow your clinician's caffeine guidance
- Do not stop a heavy caffeine habit abruptly; taper
- The two direct dose-and-timing trials here are small (12 and 23 participants) and the 23-participant trial enrolled men only, so none of this has been tested this way in women
- If you are pregnant, trying to conceive or breastfeeding, caffeine guidance is different and lower than anything on this page; follow your own clinician's or midwife's advice
- Educational only, not medical advice