how many hours before bed should I stop caffeinecaffeine half-lifecaffeine and sleepcaffeine before bed

Part of Anxiety regulation & sleep restoration

Caffeine's ~4-hour half-life means a 6-hour buffer often isn't enough. The evidence on when to stop caffeine before bed — and why your genes move the number.

· · 5 min read

When to Stop Drinking Caffeine Before Bed: The Evidence

You had your last coffee at 3 p.m. You feel fine by bedtime — no jitters, no racing heart. So you assume the caffeine is gone.

It isn’t. “I don’t feel it” and “it’s out of my system” are two different claims, and the pharmacokinetics only back one of them. Here’s the honest version: the popular “no caffeine after 2 p.m.” rule is roughly the right idea for the wrong reason, and the real answer depends on your dose and your genes.

The defensible rule of thumb: stop caffeine at least 8–9 hours before bed if you want to protect total sleep time — closer to the meta-analytic estimate than the folk wisdom of “6 hours.” For a 10 p.m. bedtime, that means your last real coffee by early afternoon. But treat that as a starting point, not a law: a big pre-workout dose needs a much longer runway, and fast metabolizers may get away with less. Below is where those numbers come from.

How long does caffeine actually stay in your system?

Longer than it feels like it does.

After you drink it, caffeine is almost completely absorbed, with plasma levels peaking around 30–60 minutes later. Then it clears slowly. A recent 2026 review (Liu & Xu) puts caffeine’s half-life at roughly 4 hours — the time for blood levels to fall by half. The liver enzyme CYP1A2 handles over 90% of that clearance.

The half-life is the part people underestimate. If you drink a coffee with 100 mg of caffeine at 3 p.m., you don’t have zero at bedtime — you have a meaningful fraction still circulating. After one half-life (~7 p.m.) about half remains; after two (~11 p.m.) about a quarter is still on board, blocking the adenosine receptors that build your drive to sleep. “Not feeling wired” doesn’t mean the drug has left; tolerance dulls the sensation long before the molecule clears.

Does caffeine 6 hours before bed really disrupt sleep?

Yes — and this is the study that put a number on it.

The landmark trial is Drake et al. (2013) in the Journal of Clinical Sleep Medicine. Researchers gave a fixed 400 mg dose of caffeine — roughly two to three cups of coffee — at three timings: at bedtime, 3 hours before bed, and 6 hours before bed, against placebo. The finding that made it famous: all three timings significantly disrupted sleep, including the 6-hour condition. Caffeine taken a full six hours before lights-out still measurably cut into sleep.

The authors’ conclusion was blunt: the reduction in sleep time from caffeine 6 hours before bed is large enough to have “important disruptive effects,” and it provides “empirical support for sleep hygiene recommendations to refrain from substantial caffeine use for a minimum of 6 hours prior to bedtime.” Six hours is the floor, not the target — and it was tested with a fairly hefty 400 mg dose.

What’s the precise cut-off by dose?

This is where the newer evidence beats the old folklore.

A 2023 systematic review and meta-analysis (Gardiner et al.) in Sleep Medicine Reviews pooled 24 studies with the explicit goal of finding “the time after which caffeine should not be consumed prior to bedtime.” Across the trials, caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7%, pushed sleep-onset latency up by 9 minutes, and — the part that matters for how rested you feel — cut deep sleep (N3/N4) by about 11 minutes while increasing light N1 sleep. Caffeine doesn’t just keep you up; it hollows out the restorative stages.

The information-gain most articles skip is the dose-specific timing the review produced. To avoid losing total sleep time, they estimated:

  • A standard coffee (107 mg per 250 mL) should be your last at least ~8.8 hours before bed.
  • A standard pre-workout serving (217.5 mg) needs ~13.2 hours of clearance.

That second number reframes the whole question. A late-afternoon pre-workout or a large energy drink isn’t a “6-hour” problem — it’s an all-day one. Dose drives the cut-off, which is exactly why a single fixed rule fails. (It’s also why caffeine’s downsides aren’t only about sleep — see how caffeine amplifies the stress response.)

Why does the same coffee wreck one person’s sleep and not another’s?

Because you don’t all metabolize it at the same speed — and the gap is enormous.

The 2026 review is direct about the mechanism: CYP1A2 enzyme activity varies up to 15-fold across the population, producing a spectrum from “slow” to “rapid” metabolizers. Much of that is genetic. Common variants in the CYP1A2 gene (the well-studied rs762551 among them) shift you along that continuum: some people clear caffeine briskly, others hold onto it for hours longer than the “4-hour half-life” average implies.

That’s the real reason your friend sleeps fine after an 8 p.m. espresso and you don’t. If you’re a slow metabolizer, that 4-hour half-life might behave more like 6 or 8 for you, and the “safe” cut-off moves several hours earlier. Smoking, pregnancy, and some medications shift CYP1A2 activity on top of the genetics. There’s no single correct hour — there’s your hour.

So how many hours before bed should you stop caffeine?

Start with 8–9 hours before bed for a normal coffee, per the meta-analytic estimate — not the softer 6-hour floor. Then adjust for reality:

  • Big dose? Pre-workout, energy drinks, or a double espresso need far more runway — up to ~13 hours for a full pre-workout serve.
  • Sensitive or a suspected slow metabolizer? If caffeine reliably disturbs your sleep, push the cut-off earlier still, or cap it at one morning cup.
  • Don’t trust the “I feel fine” test. Tolerance masks the effect on how awake you feel, not the effect on your deep sleep.

The point isn’t caffeine abstinence. It’s respecting the clock: the molecule outlasts the sensation by hours. If you’re using caffeine to paper over sleep you didn’t get, you’re compounding the debt — a stimulant early, a sedative or melatonin late, and a nervous system that never fully powers down. (One genuinely evidence-backed exception to the “no afternoon caffeine” instinct is the timed coffee nap — early in the day, not near bedtime.)

For the bigger picture on winding down a wired nervous system, see the pillar guide on anxiety regulation and sleep restoration.

Part of the Anxiety regulation & sleep restoration series

This article is part of our comprehensive guide to Anxiety regulation & sleep restoration. View all articles in this series →