← All articles

Caffeine Cutoff Before Bed: Coffee vs Pre-Workout & Sleep

Infographic, Caffeine Cutoff: Coffee vs. Pre-Workout showing how caffeine dose dictates how many hours before bed you must stop consuming it: Standard Coffee (107 mg) requires an 8.8-Hour Buffer (modeled to spare total sleep, placing a 107 mg coffee around 2 PM for an 11 PM bedtime), Pre-Workout (217.5 mg) requires a 13.2-Hour Buffer (carrying double the dose of a standard cup, needing an earlier slot before 10 AM), High Late Doses (400 mg) Cause Measurable Sleep Loss 6 Hours Out (across 24 studies, caffeine cut total sleep by 45 minutes and deep sleep by 11.4 minutes on average), and Oral Contraceptives Nearly Double Caffeine Clearance Time (caffeine half-life increased from 6.2 hours to 10.7 hours in women on older birth control pills)
Straight to what to do

TL;DR

  • Daily coffee can fit with good sleep when the timing and size of the last dose are matched to your bedtime.
  • A model estimated 8.8 hours before bed for a 107 mg coffee and 13.2 hours for a 217.5 mg pre-workout to avoid reducing total sleep.
  • Modeled cutoffs are starting points: a newer trial found no significant sleep effect from 100 mg even 4 hours before bed, and habitual daytime intake showed no significant change in sleep structure in a small trial.
  • When late caffeine causes trouble, an earlier cup or a smaller late one offers a way to keep coffee in the day.

Key facts

  • Across 24 studies, caffeine cut total sleep by 45 minutes and deep sleep by 11.4 minutes on average, over mixed doses and timings.
  • A 107 mg coffee was modeled to need at least 8.8 hours before bed to spare total sleep.
  • A 217.5 mg pre-workout serving was modeled to need at least 13.2 hours to spare total sleep.
  • 400 mg taken 6 hours before bed still disturbed sleep in the home.
  • In 20 young male habitual users taking 3 × 150 mg caffeine a day with the last dose 8 hours before bed, sleep structure and reported sleep quality did not differ significantly from placebo.

At a glance: how the cup changes the cutoff

  • Standard coffee, 107 mg: Modeled to spare total sleep: about 8.8 hours before bed.
  • Pre-workout, 217.5 mg: Modeled to spare total sleep: about 13.2 hours before bed; larger doses may need longer.
  • Daytime habitual intake, last dose 8 hours out: No significant change in sleep structure in young male habitual users.
  • On older contraceptive pills: Half-life 10.7 hours vs 6.2 hours in one 1980 study.

How long before bed should your last coffee be?

About 8.8 hours is one modeled starting point for a coffee containing 107 mg caffeine. A meta-analysis estimated that this dose would need 8.8 hours before bed to avoid reducing total sleep, and a 217.5 mg pre-workout serving 13.2 hours. Those windows were modeled for total sleep from elimination curves, so they are a starting point rather than a tested line.

Counting back 8.8 hours puts that modeled coffee around 2 pm for an 11 pm bedtime. The cutoff is a timing rule for a daily tool. Actual caffeine content, bedtime and individual response determine where the last cup fits.

A newer randomized crossover trial in 23 men found no significant sleep effect from 100 mg taken 12, 8 or 4 hours before bed. A 400 mg dose affected sleep initiation and structure within 12 hours of bed, with more fragmentation within 8 hours. The model offers a useful reference, while the trial shows why the same clock rule need not fit a small coffee and a large dose.

How long does caffeine stay in your system?

Feeling less alert again does not tell you how much caffeine remains. Caffeine works by blocking adenosine receptors. Adenosine builds up while you're awake and creates the pressure to sleep, and with repeated cups across a day caffeine might occupy up to half of one main type of these receptors in the brain. That blockade is what makes your morning coffee useful, and it is also why caffeine still circulating at bedtime gets in the way of sleep.

Clearing it takes a while because the body breaks caffeine down in steps. On average about 80% of it becomes paraxanthine, an active breakdown product that produced similar adrenaline and blood-pressure responses at the higher matched dose in a small trial. Paraxanthine is another reason metabolism involves more than removing the parent compound. This experiment did not measure sleep or establish an extra cutoff window.

Does afternoon caffeine reduce deep sleep even if you fall asleep fast?

A large, late dose can, and you may not notice. In a home study, one large 400 mg dose taken 6 hours before bed caused measurable sleep loss on sleep monitors compared with placebo, while reported sleep quality did not differ significantly from placebo. That trial is the one usually cited in support of the familiar six-hour guidance, and it tested one big dose. In eight young men, even 100 mg at bedtime made it slower to fall asleep and trimmed the deepest stage of sleep and its slowest brain waves.

The pooled data add the dose picture. Across 22 crossover trials with 956 people, only the high-dose subgroup showed a significant reduction in the proportion of deep sleep. The dose groups didn't differ significantly from each other, and no clear dose trend emerged. The proportion of REM sleep showed no significant change. Across 24 studies of mixed doses and timings, deep sleep fell by 11.4 minutes on average.

Daily daytime caffeine showed no significant change in sleep structure in a trial of habitual users. Twenty young men took 3 × 150 mg caffeine capsules daily, with the last dose 8 hours before the sleep recording. Total sleep, time to fall asleep, sleep structure and reported sleep quality did not differ significantly from placebo. One brain-wave measure, the power in the sleep-spindle range, was lower, which the authors suggest might be an early sign of overnight withdrawal from the daytime caffeine. The study included only men.

So falling asleep quickly gives an incomplete picture of a large late dose. Daytime caffeine with a buffer before bed showed no significant change in sleep structure in habitual users. Dose, timing and personal clearance all matter.

A community study using genetic causal-inference methods and statistical matching also found a mixed pattern at high habitual intake: four or more caffeinated drinks a day was linked to shorter total sleep and deeper non-REM sleep. It was not a randomized coffee-timing trial and does not establish health damage or an individual cutoff. Sleep duration and depth can move in different directions.

Why does a pre-workout need an earlier cutoff than morning coffee?

A pre-workout can deliver a bigger dose than a cup of coffee. At 217.5 mg, a standard serving carries about twice the caffeine of a 107 mg coffee, and the model gave it at least 13.2 hours before bed to spare total sleep. Larger doses may need a wider window still.

Training time decides how this plays out. For an 11 pm bedtime, the modeled 217.5 mg serving falls before about 10 am. A 6 pm serving would sit well inside that window. An earlier caffeine serving keeps it further from sleep. If someone chooses caffeine later, a smaller dose may fit better, though these data establish no universally sleep-neutral evening amount.

How do birth control pills and CYP1A2 genes change your caffeine timing?

Clearance differs from person to person, and two factors have data behind them. In one 1980 study of older contraceptive pill formulations, caffeine's half-life, the time for its concentration to fall by half, was 10.7 hours in women on the pill against 6.2 hours in women who weren't taking it. That study measured clearance, with no sleep outcome, and modern pills weren't tested. For someone on the pill who notices late coffee lingering, moving the cup earlier fits that slower clearance.

Genes play a part too. The liver enzyme CYP1A2 breaks down caffeine. A common variant in its gene showed an effect in smokers. In non-smokers, the measured caffeine-metabolite ratios did not differ significantly between genotypes. The clearest guide to your own timing is how your sleep responds when the cup moves earlier.

The action plan

How to keep daily coffee and protect your sleep

Coffee with food, or with milk plus sugar or honey, keeps nourishment alongside the stimulation. Milk and sweetener supply energy, and whole milk also provides protein and minerals. Adequate food belongs alongside deliberate coffee use.

Caffeine can raise cortisol and adrenaline. A hormone rise alone does not establish damage. Food supports energy availability, while the sleep evidence here gives timing and dose their own importance.

Later in the day, an earlier cup or a smaller late one may help. Larger doses were modeled to need a longer window before bed. With the same clearance rate, a smaller dose leaves less caffeine at bedtime. If a cup feels like it is lingering into the night, changing how and when you have it comes long before any thought of giving it up.

The evening has its own good option. Warm whole milk with honey is a caffeine-free drink that suits the hours when coffee no longer fits, and ripe fruit or a glass of orange juice sit well alongside it.

If you are pregnant or breastfeeding, have a heart condition, have a diagnosed anxiety or panic disorder, or take medication that interacts with caffeine (for example fluvoxamine or ciprofloxacin), talk to your doctor before changing your intake in either direction.

What the research does not show

  • That the average 11.4-minute deep-sleep loss causes measurable harm.
  • A tested cutoff hour: 8.8 and 13.2 hours are modeled from elimination curves, for total sleep.
  • Sleep effects in people on modern contraceptive pills.
  • That a CYP1A2 genotype predicts how caffeine affects your sleep.
  • How daily daytime coffee affects sleep structure in women.

The one-page recap

Timing

  1. Standard 107 mg coffee: about 8.8 hours before bed (modeled for total sleep).
  2. 217.5 mg pre-workout: about 13.2 hours (modeled for total sleep); bigger doses may need longer.

What the evidence shows

  1. Dose: only the high-dose subgroup showed a significant fall in deep-sleep proportion; dose groups did not differ significantly; REM proportion showed no significant change.
  2. Late large dose: 400 mg taken 6 hours before bed caused measured sleep loss; reported sleep quality did not differ significantly from placebo.
  3. Daytime habit: last dose 8 hours out, no significant change in sleep structure in young male habitual users.

Personal variation

  1. Older pills: slower clearance in one 1980 study.
  2. CYP1A2 variant: effect seen in smokers only.

Practical options

  1. Morning: coffee with food, or with milk plus sugar or honey.
  2. Afternoon: an earlier cup or a smaller late one.
  3. Evening: warm whole milk with honey.

Frequently asked questions

Is coffee before bed ever OK?

In the pooled trials, the high-dose subgroup showed a significant fall in deep-sleep proportion; both dose groups showed shorter total sleep. In the newer trial, 100 mg produced no significant sleep effect as late as 4 hours before bed. At bedtime itself, 100 mg slowed sleep onset in eight young men in the older trial. Timing and amount both matter, with different results under different conditions.

Does decaf have caffeine?

Decaf can still contain caffeine, and the amount varies between drinks. In a 2006 analytical study of decaffeinated coffee from retail outlets, 16-oz brewed servings ranged from 0 to 13.9 mg of caffeine and decaf espresso shots ranged from 3.0 to 15.8 mg per shot. A decaf label alone does not give an exact caffeine dose.

Does caffeine affect REM sleep?

In a meta-analysis of 22 crossover trials involving 956 adults, caffeine's effect on the share of REM sleep wasn't significant. The significant pooled effects included shorter total sleep, lower sleep efficiency, and longer time to fall asleep. The high-dose subgroup also showed a significant reduction in deep-sleep proportion.

Can a sleep tracker show caffeine's effect on sleep?

A consumer tracker estimates sleep from signals such as pulse and movement. Stage estimates can disagree with laboratory brain-wave recordings, as a validation study of an earlier ring model showed, and clinicians have described preoccupation with perfect tracker results as orthosomnia. A pattern in sleep timing, awakenings and daytime restfulness is more useful context than one stage score, though feeling rested can miss some measured changes.

How many hours before bed should you stop taking pre-workout?

A 2023 systematic review and meta-analysis of 24 sleep studies modeled that a standard 217.5 mg pre-workout serving needs at least 13.2 hours before bed to avoid reducing total sleep time, compared with 8.8 hours for a 107 mg cup of coffee. For an 11 pm bedtime, that places a 217.5 mg pre-workout before 10 am.

Does drinking three cups of coffee spread across the day affect sleep like one large late dose?

No, spreading caffeine across the morning and early afternoon gives earlier servings hours more to clear than a single large late dose. In a crossover trial of 20 habitual male consumers taking 3 × 150 mg caffeine capsules daily with the final dose 8 hours before bed, total sleep time, time to fall asleep, sleep structure, and reported sleep quality did not differ significantly from placebo.

References

  1. Benowitz NL, et al. (1995). Sympathomimetic effects of paraxanthine and caffeine in humans. Clinical Pharmacology and Therapeutics, 58(6), 684–691. PMID: 8529334.
  2. Chang YH, et al. (2025). Age- and dose-specific effects of caffeine on sleep: A meta-analysis of controlled crossover trials. Sleep Medicine, 136, 106874. PMID: 41124973.
  3. Drake C, et al. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 9(11), 1195–1200. PMID: 24235903.
  4. Elmenhorst D, et al. (2012). Caffeine occupancy of human cerebral A1 adenosine receptors: in vivo quantification with 18F-CPFPX and PET. Journal of Nuclear Medicine, 53(11), 1723–1729. PMID: 22966134.
  5. Gardiner C, et al. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 69, 101764. PMID: 36870101.
  6. Landolt HP, et al. (1995). Caffeine reduces low-frequency delta activity in the human sleep EEG. Neuropsychopharmacology, 12(3), 229–238. PMID: 7612156.
  7. Patwardhan RV, et al. (1980). Impaired elimination of caffeine by oral contraceptive steroids. The Journal of Laboratory and Clinical Medicine, 95(4), 603–608. PMID: 7359014.
  8. Sachse C, et al. (1999). Functional significance of a C-->A polymorphism in intron 1 of the cytochrome P450 CYP1A2 gene tested with caffeine. British Journal of Clinical Pharmacology, 47(4), 445–449. PMID: 10233211.
  9. Weibel J, et al. (2021). The impact of daily caffeine intake on nighttime sleep in young adult men. Scientific Reports, 11(1), 4668. PMID: 33633278.
  10. Gardiner CL, et al. (2025). Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep, 48(4), zsae230. PMID: 39377163.
  11. Stucky B, et al. (2025). Community-based causal evidence that high habitual caffeine consumption alters distinct polysomnography-derived sleep variables. Journal of Psychopharmacology, 39(12), 1437–1448. PMID: 41109744.
  12. Lovallo WR, et al. (2005). Caffeine stimulation of cortisol secretion across the waking hours in relation to caffeine intake levels. Psychosomatic Medicine, 67(5), 734–739. PMID: 16204431.
  13. McCusker RR, et al. (2006). Caffeine content of decaffeinated coffee. Journal of Analytical Toxicology, 30(8), 611–613. PMID: 17132260.
  14. de Zambotti M, et al. (2019). The Sleep of the Ring: Comparison of the ŌURA Sleep Tracker Against Polysomnography. Behavioral Sleep Medicine, 17(2), 124–136. PMID: 28323455.
  15. Baron KG, et al. (2017). Orthosomnia: Are Some Patients Taking the Quantified Self Too Far? Journal of Clinical Sleep Medicine, 13(2), 351–354. PMID: 27855740.