How Long Before Bed Should You Stop Drinking Caffeine?

The AASM cites a 6-hour cutoff. A 2023 dose-response meta-analysis says 8.8 hours for a single cup. Why a single number can't fit everyone — and how to think about your own.

About this article

This is an informational summary of peer-reviewed research on caffeine pharmacology and sleep. It is not medical advice, diagnosis, or treatment guidance. The studies cited describe controlled trials and population data — not personal predictions, and individual caffeine response varies widely with genetics, medications, smoking, age, and underlying conditions. If chronic insomnia, anxiety, or cardiovascular concerns are part of your picture, please consult a licensed healthcare professional.

In a 2013 randomized trial led by Christopher Drake, twelve healthy normal sleepers were given 400 mg of caffeine — roughly the equivalent of a strong large coffee or a couple of grandes — exactly six hours before their habitual bedtime. They wore polysomnography sensors at home and slept as they normally would. The next morning, their subjective reports were unremarkable. They thought they had slept fine. The objective sleep recording showed something different — total sleep time was reduced by approximately 41 minutes; deep slow-wave sleep was suppressed; nighttime awakening crept up. The American Academy of Sleep Medicine cites the Drake study as the empirical foundation for advising adults to stop substantial caffeine intake at least six hours before bed. The point of this article is what that cutoff means in practice — and why a single number can't actually fit everyone.

The short answer. The AASM cites the Drake 2013 polysomnography RCT as evidence for stopping substantial caffeine at least 6 hours before bed. A 2023 dose-response meta-analysis (Gardiner et al., 24 studies) refines that with quantitative cutoffs — for a standard 107 mg cup of coffee, the cutoff at which detectable sleep impact drops to near zero is about 8.8 hours; for a 217 mg pre-workout dose, about 13.2 hours. The 6-hour rule is a sensible floor for typical doses, not a guarantee. Individual genetic variation in caffeine metabolism (CYP1A2 polymorphisms, with caffeine clearance varying roughly 5-fold or more between adults), plus modifiers like smoking, oral contraceptives, pregnancy, and age, mean a single cutoff number can never fit everyone — the AASM 6-hour floor is just where to start.

This post walks through six things — (1) the mechanism of caffeine's wake effect (adenosine antagonism in plain terms), (2) the foundational Drake 2013 trial that anchors the 6-hour cutoff, (3) the modern dose-aware refinement from Gardiner 2023 and 2025, (4) why personal answers diverge — CYP1A2 variation, smoking, contraceptives, pregnancy, age, (5) caffeine content by source, including the under-recognized fact that decaf is not zero, and (6) a practical decision rule with a worked example.

How caffeine before bed actually disrupts sleep — adenosine antagonism, in plain terms

While you're awake, ATP in the brain is broken down across the day, and adenosine — one of the breakdown products — accumulates. Adenosine binds to A1 and A2A receptors and triggers what sleep medicine calls homeostatic sleep pressure (Process S). This is why you feel progressively sleepier as the day goes on, even without measuring anything.

Caffeine resembles adenosine closely enough at the molecular level to bind those same A1 and A2A receptors. Reichert, Deboer & Landolt 2022 describes caffeine as a "potent adenosine receptor antagonist" with high affinity for both A1 and A2A subtypes. While caffeine is bound, the adenosine signal is blocked.

The narrative implication is sharper than it sounds — caffeine does not give you energy; it blocks the body's tiredness signal. Your brain continues consuming ATP at its normal rate. Adenosine continues accumulating. As long as caffeine concentrations remain above the threshold required to occupy adenosine receptors, the tiredness signal is silenced. When caffeine clears, the accumulated tiredness arrives at once — the "caffeine crash."

This mechanism is the foundation for the cutoff conversation. The question of how long before bed to stop caffeine is, biologically, the question of when blood caffeine has dropped low enough that A1/A2A receptor occupancy releases. The half-life of caffeine determines that timeline — and as the next sections show, that half-life varies widely between people.

Drake 2013 — the foundational basis for the 6-hour cutoff

The Drake et al. 2013 trial in the Journal of Clinical Sleep Medicine is the single most-cited study behind the AASM's 6-hour cutoff recommendation. The design was a randomized, double-blind, placebo-controlled crossover with Latin Square sequencing — twelve healthy normal sleepers (ages 19 to 48, six women and six men) participated. Each participant received 400 mg of caffeine versus placebo on separate nights, taken at 0, 3, or 6 hours before their habitual bedtime. They slept at home wearing a wireless polysomnography sensor.

Key findings:

  • Total sleep time at the 6-hour-before-bed condition — reduced by approximately 41 minutes versus placebo on objective polysomnography. (The AASM press release describes this in plainer language as "more than one hour" of objective sleep loss; the precise minute figure is in the original paper.)
  • Slow-wave (deep) sleep — significantly reduced at both the 0-hour and 6-hour conditions.
  • Wake after sleep onset — +27.6 minutes at the 3-hour condition; +8 minutes at the 6-hour condition.
  • Subjective ratings — participants did not perceive these objective sleep changes. This is the rhetorical hook of the study — the people who lived through the polysomnography-confirmed sleep disruption did not notice it.

The authors concluded that the data provide "empirical support for sleep hygiene recommendations to refrain from substantial caffeine use for a minimum of 6 hours prior to bedtime." The AASM cites the same paper as the empirical basis for its public-facing 6-hour recommendation.

The honest caveats — n = 12 is a small sample. The dose was a single fixed level (400 mg, roughly three standard cups). The crossover design helps with statistical power within the trial, but generalizing to other doses, populations, and ages requires the broader evidence base in the next section.

Quantitative refinement — Gardiner 2023 and 2025

The Gardiner research group at the Australian Institute of Sport extended the cutoff conversation with two more recent studies that systematically vary dose and timing.

Gardiner 2023 dose-response meta-analysis. Published in Sleep Medicine Reviews, this meta-analysis pooled 24 studies and produced averaged effect sizes for caffeine on subsequent sleep:

  • Total sleep time: −45 minutes
  • Sleep efficiency: −7 %
  • Sleep onset latency: +9 minutes (peak effect approximately 3 hours post-consumption)
  • Wake after sleep onset: +12 minutes
  • Slow-wave (deep) sleep N3: duration −11.4 minutes, proportion −1.4 %

Most usefully, the authors derived dose-aware cutoffs — the time before bed at which detectable sleep disruption fell to near zero:

  • 107 mg standard cup of coffee → about 8.8 hours before bed
  • 217.5 mg pre-workout caffeine → about 13.2 hours before bed

Gardiner 2025 dose × timing RCT. The same group's 2025 Sleep journal RCT directly tested the dose × timing matrix at home with polysomnography:

  • 100 mg, 4 hours before bed → no significant sleep effect versus placebo
  • 400 mg, 4 hours before bed → TST −50.6 min; sleep efficiency −9.5 %; sleep onset latency +14.2 min; deep sleep −29.7 min
  • 400 mg, 8 hours before bed → sleep efficiency still −6.9 %; deep sleep −15.3 min

Reading the AASM 6-hour rule alongside Gardiner gives a more defensible synthesis. Six hours is the cutoff at which an average dose shows substantially reduced disruption — a sensible floor for typical adult use. Eight hours and beyond is the more accurate window for "near-zero detectable impact" on a standard cup. Thirteen hours is the realistic margin for high-dose pre-workout caffeine.

Why personal answers diverge — CYP1A2 variation and other modifiers

The single biggest reason a flat number doesn't fit everyone is that caffeine clearance varies dramatically between people. The mean caffeine half-life in healthy adults is approximately 5 hours, but the typical population range is 1.5 to 9.5 hours (StatPearls "Caffeine"; Nehlig 2018 review). That's a wider spread than the 6-hour cutoff itself.

Approximately 95 % of caffeine is metabolized by the liver enzyme CYP1A2 (Nehlig 2018), and inter-individual differences in CYP1A2 enzyme activity are substantial — typical estimates fall in the roughly 5-fold or more range, depending on cohort and measurement method.

CYP1A2 rs762551. The single best-characterized genetic variant affecting caffeine metabolism is the rs762551 SNP in the CYP1A2 gene:

  • AA genotype = fast metabolizer (shorter half-life)
  • AC or CC genotype = slow / intermediate metabolizer (longer half-life)

Genotype distributions vary by ethnic background, but in many reference populations the slow / intermediate phenotypes are common — roughly half of the cohort or more in published genotyping work. For instance, an Italian cohort published genotype frequencies of approximately AA 43 %, AC 41 %, CC 16 %, placing more than half of participants in the slower-metabolizer category. Sachse et al. 1999, looking specifically at a smokers cohort, reported about 40 % lower CYP1A2 enzyme activity in CC homozygotes compared with AA homozygotes — a substantial slowing of clearance.

Other modifiers stack on top of CYP1A2. Several common factors compound:

  • Smoking induces CYP1A2 and shortens caffeine half-life by up to 50 %.
  • Oral contraceptives inhibit CYP1A2 and lengthen caffeine half-life by approximately 50 % (i.e., from ~5 hours to ~7-8 hours on average).
  • Pregnancy in the third trimester can lengthen caffeine half-life to as long as approximately 15 hours.
  • Adults over 50 typically show modestly slower clearance.

A non-smoking pregnant CC homozygote would have one of the slowest combined caffeine clearance profiles in the population. Practically, that means a single-cutoff recommendation can be off by hours in either direction depending on who the reader is. The next two sections give the data needed to dial it in.

Caffeine content by source — what's actually in your cup

The single word "coffee" hides an 80–400+ mg caffeine range. Calculating an honest cutoff requires knowing the dose. The values below are typical-serving estimates compiled from USDA FoodData Central, peer-reviewed analyses, and manufacturer labels.

Source Typical serving Caffeine (mg)
Drip / brewed coffee8 fl oz (240 mL)80–100 (avg ~95)
Drip "grande" / large16 fl oz165–310
Espresso (single shot)1 fl oz60–65
Espresso (double)2 fl oz120–130
Instant coffee8 fl oz60–65
Cold brew8 fl oz150–240
Decaf coffee16 fl oz0–13.9 (not zero)
Black tea, brewed8 fl oz40–50
Green tea, brewed8 fl oz25–30
Matcha1 cup (~2g powder)40–135
Coca-Cola Classic12 fl oz~34
Diet Coke12 fl oz~46
Mountain Dew12 fl oz~54
Red Bull8.4 fl oz can80
Monster Energy16 fl oz can160
Celsius12 fl oz can200
Bang Energy16 fl oz can300
Pre-workout supplement1 scoop91–387 (label-dependent; see below)
Dark chocolate (70–85%)1 oz (28g)20–25

Several points hide inside the table:

  • Decaf is not zero. McCusker et al. 2006 measured caffeine content in decaffeinated coffee from major US chains and found 0 to 13.9 mg per 16-ounce serving — meaning a "decaf coffee" can contain a non-trivial fraction of a normal cup, especially if the reader drinks two or three of them in the evening.
  • Pre-workout supplements vary wildly versus their labels. Desbrow et al. 2018 measured the actual caffeine content of pre-workout supplements and found values ranging from 59 % to 176 % of the labeled amount, with absolute caffeine ranging from 91 to 387 mg per serving.
  • A 16-ounce coffee is not a single cup. It's roughly two standard 8-ounce servings. A single drink at a chain shop often delivers 200+ mg.

Practical decision rule and a worked example

Synthesizing the evidence, an informational rule-of-thumb table — not medical advice, and not a personal prescription:

Situation Cutoff before bed
Average metabolizer, typical 95–200 mg dose6 to 8 hours (AASM floor; Gardiner 2023 near-zero margin)
Single ~100 mg drinkat least 4 hours (Gardiner 2025 RCT lower bound)
200 to 400 mg dose8 to 12 hours
Pre-workout supplement (200 to 400 mg)13 hours (Gardiner 2023 cutoff)
Suspected slow metabolizer; oral contraceptives; pregnancy; age 50+longer (8 to 12 hours for typical doses)

Worked example. Suppose you target an 11 PM bedtime and drink a 200 mg coffee at 3 PM. Assuming an average 5-hour caffeine half-life, the residual at 11 PM (8 hours later) is approximately 200 × 0.5^(8/5) ≈ 66 mg. For an average metabolizer, that residual sits in the borderline-tolerable zone — the Gardiner 2025 RCT showed 100 mg taken 4 hours before bed had no detectable impact, but extrapolating to "66 mg residual at bedtime" is at the edge of the well-studied window.

Now suppose you're a slow metabolizer with a half-life closer to 8 hours. The same calculation becomes 200 × 0.5^(8/8) = 100 mg residual at bedtime — squarely in the range the literature predicts as substantial sleep architecture disruption. Pulling the cutoff back to 1 to 2 PM would lower the residual at bedtime by another half-life or so, increasing the safety margin.

Slow-metabolizer signals — informational, not diagnostic:

  • Sustained jitteriness or anxiety four to six hours after a single cup.
  • Lunchtime coffee delaying sleep onset that night.
  • Detectable sleep impact from two or three cups of decaf in the evening.
  • Family members report similar slow-clearance profiles.

If those signals fit your pattern, the AASM 6-hour cutoff is best treated as a floor, not a ceiling — 8 to 12 hours before bed is the more accurate margin for slower clearance profiles. The reverse is rarer and harder to confirm without genotyping; a fast metabolizer is best identified by the absence of slow-metabolizer signals, not by perceived tolerance, since the Drake 2013 finding (subjective tolerance does not match objective sleep disruption) applies in either direction.

If you'd like to translate a target wake time into a specific cycle-aligned bedtime — and from there back-calculate a caffeine cutoff — the Sleep Cycle Calculator tool runs the math for any wake time, with adjustable cycle length and sleep onset latency.

Sleep Cycle Calculator showing how to back-calculate a caffeine cutoff time from a target bedtime — for an 11 PM bedtime, a 6-hour caffeine cutoff lands at 5 PM, an 8-hour cutoff at 3 PM

For an 11 PM bedtime, a 6-hour cutoff lands at 5 PM and an 8-hour cutoff at 3 PM. The exact margin depends on dose, metabolizer profile, and modifiers like contraceptives or smoking.

Free tool
Sleep Cycle Calculator →
Find a bedtime aligned to the end of a 90-minute sleep cycle, then back-calculate the caffeine cutoff that gives you the safety margin your dose and metabolizer profile actually needs.

Common questions about caffeine and sleep

How long does caffeine stay in your system?
The mean caffeine half-life in healthy adults is about 5 hours, with a typical population range of 1.5 to 9.5 hours (StatPearls; Nehlig 2018). A 200 mg dose at 3 PM leaves roughly 100 mg in the bloodstream at 8 PM (one half-life later) and roughly 50 mg at 1 AM — for a person with average metabolism. Slower metabolizers — including people on oral contraceptives, third-trimester pregnancy, age 50+, or carriers of the CC genotype at CYP1A2 rs762551 — clear caffeine more slowly, and the same dose stays around longer.

Is decaf coffee really decaf?
Decaffeinated coffee is not zero caffeine. McCusker et al. 2006 measured 0 to 13.9 mg of caffeine per 16-ounce serving across decaf coffees from major US chains. For a sensitive sleeper, two or three decaf coffees in the evening can deliver a small caffeine dose in absolute terms. People with very slow metabolism may notice sleep impact from evening decaf alone.

Can you build tolerance to caffeine's sleep effects?
The literature is genuinely mixed on this. Habitual caffeine users can show some tolerance to subjective sleepiness suppression, but objective polysomnography studies (Drake 2013; Gardiner 2023 meta) consistently show that habitual users still experience measurable sleep architecture changes from afternoon and evening caffeine — they often just don't notice it. The honest read is that subjective tolerance does not eliminate objective sleep disruption; people who report sleeping fine after late coffee may be sleeping fine subjectively but showing reduced deep sleep on a sleep recording.

Is it OK to drink coffee 6 hours before bed?
For an average dose (95–200 mg) and average metabolism, the AASM cites 6 hours as the floor at which substantial disruption is reduced. The Gardiner 2023 meta-analysis pushes that to 8.8 hours for "near-zero detectable impact" on a standard cup. Practically — 6 hours is acceptable for most adults if the dose is small and the bedtime is firm, but stretching to 7 to 8 hours increases the safety margin, and slower metabolizers should treat 6 hours as a floor rather than a target.

What time should I stop drinking caffeine for an 11 PM bedtime?
For a typical dose at average metabolism, 5 PM lines up with the AASM 6-hour cutoff. For "near-zero detectable impact," 2 PM aligns with the Gardiner 2023 8.8-hour cutoff for a standard cup. For pre-workout or large doses, the same paper suggests pulling the cutoff back to about 10 AM (13.2 hours before bed). For sensitive sleepers, pulling caffeine cutoff back to morning-only is the conservative path described in the literature.

Does pre-workout caffeine affect sleep more than coffee?
Pre-workout supplements often deliver 200 to 400 mg per scoop — roughly two to four standard cups of coffee in a single dose. Desbrow et al. 2018 measured actual content ranging from 59 % to 176 % of label values, so the dose can be higher than expected. Gardiner 2023 derived a 13.2-hour cutoff for 217 mg pre-workout doses to reach near-zero detectable sleep impact. For evening or late-afternoon training sessions, the literature describes substantially earlier cutoffs (or non-stimulant alternatives) as worth considering.

For mechanisms that produce nighttime awakening at 3 AM specifically — including the role caffeine plays alongside cortisol, alcohol, and OSA — see Why Do I Wake Up at 3 AM Every Night? If sleep onset is the harder problem, what does and does not work according to the AASM's behavioral treatment guideline is covered in How to Fall Asleep Faster.

A note on accuracy

This guide summarizes pharmacology and sleep research drawn from peer-reviewed primary sources and major guideline statements. The half-life ranges, genotype frequencies, and dose-response cutoffs above describe population averages and study findings — they are not personal predictions, and individual caffeine response varies with genotype, smoking, contraceptive use, pregnancy, age, liver health, and other medications. None of this is medical advice or a substitute for clinical evaluation. If chronic insomnia, anxiety symptoms, cardiovascular concerns, or pregnancy considerations are relevant to your situation, please consult a licensed healthcare professional.

Primary sources Drake C et al. 2013 — Caffeine effects on sleep taken 0, 3, or 6 h before going to bed (PubMed 24235903) · Drake 2013 full text (PMC3805807) · AASM — Caffeine in late afternoon / early evening can disrupt sleep · Gardiner C et al. 2023 — Caffeine and sleep dose-response meta-analysis (Sleep Med Rev) · Gardiner C et al. 2025 — Dose × timing RCT (Sleep, PMC11985402) · Reichert, Deboer & Landolt 2022 — Caffeine, sleep, and adenosine review (J Sleep Res, PMC9541543) · Nehlig A 2018 — Interindividual differences in caffeine metabolism (Pharmacol Rev) · StatPearls — Caffeine pharmacology · Sachse C et al. 1999 — CYP1A2 polymorphism and enzyme activity (Br J Clin Pharmacol) · McCusker RR et al. 2006 — Caffeine content of decaffeinated coffee (PubMed 17132260) · Desbrow B et al. 2018 — Caffeine content of pre-workout supplements (PubMed 30196576) · USDA FoodData Central — Caffeine content of foods and beverages · Mayo Clinic — Caffeine: how much is too much? · Sleep Foundation — Caffeine and sleep

Next read