Caffeine and Sleep: When to Stop and How Long It Lasts

A woman in a grey apron stands at a gas hob with one hand on a navy enamel coffee pot, a yellow colander on the wooden worktop beside her.
In this article
  1. How long does caffeine stay in your system?
  2. What does caffeine do to your sleep?
  3. What time should you stop drinking caffeine?
  4. How much caffeine is in UK drinks?
  5. Does green tea or matcha keep you awake?
  6. Does decaf affect sleep?
  7. Why do you feel awful when you cut caffeine, and how long does it last?
  8. Is there caffeine in supplements and sleep products?
  9. What we don't know
  10. Frequently asked questions

Caffeine shortens and lightens sleep even when you fall asleep easily: across 24 studies it cut total sleep by 45 minutes and deep sleep by 11.4 minutes, and the same analysis worked out that a 107 mg cup of coffee needs about 8.8 hours before bed to avoid losing sleep time.1 The NHS rule is simpler: no tea or coffee in the six hours before bed.2 This page sits inside the Wellgard sleep guide.

Sources checked on 30 October 2026.

How long does caffeine stay in your system?

Blood levels peak 30 to 120 minutes after a drink, and the half-life, the time for the body to clear half of what you took, is 3 to 6 hours in most adults.3 Across the population the range is far wider, 1.5 to 9.5 hours, and smoking shortens it.4 With a 5-hour half-life, a 100 mg instant coffee at 3pm leaves about 50 mg in circulation at 8pm and 25 mg at 1am.

The variation is largely genetic. One liver enzyme, CYP1A2, handles about 95% of the caffeine you take in, and common variants of its gene make people fast or slow clearers; variants in the brain's adenosine A2A receptor change how strongly the same dose disturbs sleep. Age, sex and hormones, liver disease, obesity, smoking, diet and several medicines shift clearance too.5

What does caffeine do to your sleep?

Caffeine blocks adenosine, the brain's sleep-pressure signal. In the 2023 meta-analysis of 24 studies, caffeine reduced total sleep by 45 minutes and sleep efficiency by 7%, lengthened the time to fall asleep by 9 minutes, added 12 minutes of waking in the night, and cut deep sleep by 11.4 minutes while light sleep rose by 6.1 minutes.1 A 2025 meta-analysis of 22 placebo-controlled crossover trials with overnight recordings (956 healthy adults) found the same pattern: 34.67 minutes less sleep, 8.35 minutes longer to fall asleep, 1.01 percentage points less slow-wave sleep and no significant effect on REM sleep; total sleep fell at high and low doses and in young and middle-aged adults, with no significant difference between those subgroups.6

The tired but wired page covers the other reasons an exhausted brain will not switch off; how to switch off your mind at night has the techniques.

What time should you stop drinking caffeine?

The NHS insomnia page says "do not smoke or drink alcohol, tea or coffee at least 6 hours before going to bed".2 That rests on a study in which 400 mg of caffeine, roughly four instant coffees, taken at bedtime, three or six hours before all disturbed sleep against placebo; six hours is the minimum that study could support, not where the effect ends.7 The 2023 meta-analysis modelled how long a dose needs to clear before total sleep time is unaffected: 8.8 hours for a 107 mg coffee and 13.2 hours for a 217.5 mg serving of pre-workout.1 The one trial to test dose and timing together, 23 men aged 18 to 40 with a moderate habitual intake under 300 mg a day, found no measurable effect on home-recorded or self-rated sleep from 100 mg taken 4, 8 or 12 hours before bed, while 400 mg delayed sleep onset and changed sleep architecture when taken within 12 hours of bedtime, fragmented sleep within 8 hours, and cut self-rated sleep quality by 34% at 4 hours; the trial was in men only, carries no funding statement, declares no conflicts, and compensated its participants.16 The sleep of older adults may be more sensitive to caffeine.8

For an 11pm bedtime the NHS floor is 5pm, the modelled cut-off for a standard coffee is about 2pm, and for a pre-workout it is before 10am; where you land between the figures depends on your own clearance.

How much caffeine is in UK drinks?

By the NHS estimate a cup of instant coffee holds about 100 mg of caffeine, a cup of black or green tea 75 mg, a can of cola 40 mg and a 250 ml can of energy drink 80 mg; the NHS notes that "filter coffee and coffee bought from coffee shops can contain more" than instant.10 The measured ranges, what "decaffeinated" and "caffeine-free" mean in law, the label statements and the regulators' figures are on how much caffeine is in coffee, tea and energy drinks.

On sleep, the wording of the European Food Safety Authority (EFSA) is that "single doses of 100mg (about 1.4mg/kg bw) of caffeine may affect sleep duration and patterns in some adults, particularly when consumed close to bedtime".9 In pregnancy the NHS and EFSA limit is lower, 200 mg a day from all sources.9, 10 What to drink before bed ranks the evening options by their evidence.

Does green tea or matcha keep you awake?

Late in the day it can: the NHS puts a cup of black or green tea at about 75 mg, so a late green tea counts like any other.10 Matcha is powdered green tea leaf, drunk whole rather than steeped, from plants shaded before harvest, which raises the leaf's theanine and caffeine content.11

Green tea also supplies L-theanine. In a 2019 randomised, placebo-controlled crossover trial run with the theanine maker, 30 healthy adults took 200 mg a day for four weeks and were assessed on stress-related symptom scales, a sleep quality score and cognitive tests.12 What it found is in what L-theanine is and what it does.

Does decaf affect sleep?

Decaf is not zero, but the decaffeinated coffees measured in one laboratory analysis were well below the 100 mg EFSA links with disturbed sleep,9, 13 and the authors advise people vulnerable to caffeine to assume some is present.13

Why do you feel awful when you cut caffeine, and how long does it last?

A review of 57 experimental and 9 survey studies validated ten withdrawal symptoms, among them headache, fatigue, drowsiness, depressed mood, difficulty concentrating and irritability. Headache occurred in 50% of people in experimental studies; symptoms typically began 12 to 24 hours after the last dose, peaked at 20 to 51 hours and lasted 2 to 9 days, and stopping intakes as low as 100 mg a day produced them.14 In four double-blind dosing experiments from the same research group, 100 mg a day was the lowest maintenance dose tested and still produced withdrawal on stopping, and withdrawal appeared after as little as three days of daily use at 300 mg.17 In a 2026 analysis of a randomised 14-day trial in which 100 regular coffee drinkers in San Francisco were assigned, day by day, to caffeinated coffee or to no caffeine, a headache was reported on 10% of coffee days and 30% of caffeine-free days, twice the risk after adjustment, and a headache that did occur was 73% less severe on coffee days; the work was university-funded and the authors declare no competing interests.18 The NHS self-help page for tiredness passes on the Sleep Charity's advice to reduce intake gradually if you want to cut caffeine out, because stopping suddenly "can lead to insomnia and headaches".19 Moving the cut-off earlier keeps the daily total the same, so it avoids withdrawal; the review did not test a step-down schedule. A bedtime routine for adults covers the rest of the evening.

Is there caffeine in supplements and sleep products?

Often. A 217.5 mg pre-workout serving is more than two instant coffees, hence its 13.2-hour cut-off.1 Guarana and some "health or fitness supplements" are on the NHS list of caffeine sources.10 Less obvious is a tea extract: green tea leaf carries caffeine unless it has been decaffeinated or purified to a single compound, so an evening product listing a green tea extract may carry some; the maker can tell you how much, and EFSA's 100 mg sleep threshold is the comparison.9 Caffeine from every source sits on the checklist in why do I wake up at 3am.

What we don't know

The 8.8-hour and 13.2-hour cut-offs are modelled from pooled studies, not tested as bedtimes in a trial, and most caffeine and sleep studies were in men.1, 8 Whether dose and age change the size of the effect is unsettled: the 2025 meta-analysis found no significant linear relationship with either.6 How far a person's CYP1A2 and adenosine-receptor genes should move their own cut-off has not been worked out.5

Frequently asked questions

Is 5pm too late for coffee?

For an 11pm bedtime, 5pm is exactly the NHS six-hour minimum and about three hours past the 8.8-hour cut-off modelled for a 107 mg cup.1, 2

What drink cancels out caffeine?

Nothing does. Caffeine is cleared by the liver at a rate set largely by your CYP1A2 genotype, and no drink speeds that up; only time does.5

Can you sleep after 100 mg of caffeine?

Many people fall asleep, but EFSA's assessment is that 100 mg "may affect sleep duration and patterns in some adults, particularly when consumed close to bedtime", and total and deep sleep fall even when falling asleep feels normal; with a 3 to 6 hour half-life, much of it is still there at bedtime.1, 3, 9 In the one trial that tested 100 mg on its own against placebo, it made no measurable difference to recorded or self-rated sleep even 4 hours before bed, in 23 men used to caffeine.16 A 1,000 mg intake is far above the 200 mg single dose and 400 mg a day EFSA considers of no safety concern;9 if you feel unwell after a large intake, NHS 111 can check your symptoms, and 999 is for life-threatening emergencies.15

Why does caffeine make some people calm or sleepy?

The studies here measured sleep after caffeine, not the sleepiness some people feel after a coffee, and genes change how strongly the same dose acts.5 Whether caffeine calms people with ADHD is a question for a GP or the prescribing clinician. If tiredness persists whatever you do with caffeine, when to see a GP about sleep lists the signs that need a conversation.

Sources

  1. Gardiner C et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Med Rev 2023. Meta-analysis, 24 studies; no conflicts declared, funding not stated on PubMed. PubMed 36870101
  2. NHS. Insomnia (reviewed 19 March 2024). nhs.uk/conditions/insomnia
  3. Mort JR, Kruse HR. Timing of blood pressure measurement related to caffeine consumption. Ann Pharmacother 2008. Literature review; funding not stated on PubMed. PubMed 18094346
  4. Somani SM, Gupta P. Caffeine: a new look at an age-old drug. Int J Clin Pharmacol Ther Toxicol 1988. Narrative review; funding not stated on PubMed. PubMed 3072303
  5. Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev 2018. Narrative review; non-commercial funding. PubMed 29514871
  6. Chang YH, Cheng YC, Cheng WJ. Age- and dose-specific effects of caffeine on sleep: a meta-analysis of controlled crossover trials. Sleep Med 2025. Meta-analysis, 22 crossover trials, 956 adults; no competing interests declared. PubMed 41124973
  7. Drake C et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med 2013. Randomised placebo-controlled crossover trial, 12 healthy sleepers; funded by a sleep-monitor maker (Zeo). PubMed 24235903
  8. Clark I, Landolt HP. Coffee, caffeine, and sleep: a systematic review of epidemiological studies and randomized controlled trials. Sleep Med Rev 2017. Systematic review; funding not stated on PubMed. PubMed 26899133
  9. EFSA. Caffeine: scientific opinion, May 2015 (topic page, read 30 October 2026). efsa.europa.eu/en/topics/topic/caffeine
  10. NHS. Foods to avoid in pregnancy: caffeine (reviewed 15 June 2026). nhs.uk/pregnancy/keeping-well/foods-to-avoid
  11. Kochman J et al. Health benefits and chemical composition of matcha green tea: a review. Molecules 2020. Narrative review; no conflicts declared. PubMed 33375458
  12. Hidese S et al. Effects of L-theanine administration on stress-related symptoms and cognitive functions in healthy adults: a randomized controlled trial. Nutrients 2019. Randomised crossover trial, 30 adults; funded by the theanine maker. PubMed 31623400
  13. McCusker RR et al. Caffeine content of decaffeinated coffee. J Anal Toxicol 2006. Laboratory analysis of 22 decaffeinated coffee samples; funding not stated on PubMed. PubMed 17132260
  14. Juliano LM, Griffiths RR. A critical review of caffeine withdrawal: empirical validation of symptoms and signs, incidence, severity, and associated features. Psychopharmacology 2004. Review of 66 studies; US government-funded. PubMed 15448977
  15. NHS. When to call 999 (reviewed 3 February 2023). nhs.uk/nhs-services/urgent-and-emergency-care-services/when-to-call-999
  16. Gardiner CL et al. Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep 2025. Randomised placebo-controlled crossover trial, 23 men, seven conditions, home polysomnography; no funding statement, disclosure statement none, participants compensated. PubMed 39377163
  17. Evans SM, Griffiths RR. Caffeine withdrawal: a parametric analysis of caffeine dosing conditions. J Pharmacol Exp Ther 1999. Four double-blind experiments in healthy adults; US government-funded. PubMed 10087016
  18. Randa L et al. Acute effects of caffeine withdrawal on headache among regular caffeinated coffee drinkers. Sci Rep 2026. Secondary analysis of a randomised 14-day case-crossover trial, 100 adults; funded by university awards, no competing interests declared. PubMed 42174033
  19. NHS. Self-help tips to fight tiredness (reviewed 8 November 2023; next review due 8 November 2026). nhs.uk/live-well/sleep-and-tiredness/self-help-tips-to-fight-fatigue

Spotted something out of date? Email support@wellgard.co.uk with the page address and the sentence.