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.

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.

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 points less slow-wave sleep and no significant effect on REM sleep; the losses held at high and low doses and in young and middle-aged adults, with no significant difference between those subgroups.6

That deep-sleep loss is how someone sleeps seven hours on caffeine and wakes unrefreshed; 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?

Two answers exist. 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 Those cut-offs are model outputs, not trial arms, and most of the underlying studies were in men; the sleep of older adults may be more sensitive to caffeine, so an earlier cut-off is sensible later in life.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; "why no coffee after 3pm?" answers itself, and where you land between the figures depends on your own clearance.

How much caffeine is in UK drinks?

NHS estimates and the European Food Safety Authority (EFSA) list sit side by side below; both are approximate, and the NHS notes that "filter coffee and coffee bought from coffee shops can contain more" than instant.9, 10

Drink or food NHS estimate EFSA figure (portion)
Instant coffee 100 mg a cup Filter coffee 90 mg (200 ml); espresso 80 mg (60 ml)
Tea, black or green 75 mg a cup Black tea 50 mg (220 ml)
Cola 40 mg a can 40 mg (355 ml can)
Energy drink 80 mg a 250 ml can 80 mg (250 ml can)
Plain dark chocolate Under 25 mg a 50 g bar 25 mg (50 g bar)
Milk chocolate Under 10 mg a 50 g bar 10 mg (50 g bar)

EFSA's ceilings: single doses up to 200 mg and daily intakes up to 400 mg "do not raise safety concerns for healthy adults in the general population, except pregnant women", for whom the limit is 200 mg a day from all sources, as the NHS also says.9, 10 On sleep, EFSA's wording 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 One instant coffee is already there; 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; how much caffeine a bowl carries depends on the powder used, so check the pack.11

Green tea also supplies L-theanine. Its trials used it alone: in a 2019 randomised, placebo-controlled crossover trial, 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, and why no theanine claim is authorised in Great Britain, is in what L-theanine is and what it does; for sleep, the theanine in a cup of green tea does not remove the caffeine beside it.

Does decaf affect sleep?

Decaf is not zero. Ten decaffeinated coffees from different outlets contained 0 to 13.9 mg of caffeine per 16 oz (about 470 ml) serving, and decaf espresso shots from one outlet ranged from 3.0 to 15.8 mg each.13 That is well below the 100 mg EFSA associates with disturbed sleep, so an evening decaf suits most people; for a slow clearer, anyone who has cut caffeine on medical advice, or several cups, the milligrams add up, and the authors advise people vulnerable to caffeine to assume some is present.13 Decaffeinated tea: less, not none.

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: headache, fatigue, decreased energy, decreased alertness, drowsiness, decreased contentedness, depressed mood, difficulty concentrating, irritability and feeling foggy. 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 So moving your cut-off earlier is easier than stopping outright: the daily total barely changes and the headache never arrives; to cut the total, step down over a week or two. Once the timing is right, the bedtime routine for adults page covers the ninety minutes before bed.

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.

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 If you wake unrefreshed, try the earlier cut-off for two weeks and judge by your mornings, not by how fast you fall asleep.

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; five hours later a typical metaboliser still carries about half of it.1, 3, 9 A 1,000 mg intake is a different matter, far above the 200 mg single dose and 400 mg a day EFSA considers of no safety concern; with palpitations, chest pain or confusion after a large intake, call 111, or 999 if severe.9

Why does caffeine make some people calm or sleepy?

Sleepiness after coffee usually means the sleep debt underneath is bigger than the dose. 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. PubMed 36870101
  2. NHS. Insomnia. nhs.uk/conditions/insomnia
  3. Mort JR, Kruse HR. Timing of blood pressure measurement related to caffeine consumption. Ann Pharmacother 2008. PubMed 18094346
  4. Somani SM, Gupta P. Caffeine: a new look at an age-old drug. Int J Clin Pharmacol Ther Toxicol 1988. PubMed 3072303
  5. Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev 2018. 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. 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. 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. PubMed 26899133
  9. EFSA. Caffeine: scientific opinion, 27 May 2015 (topic page). efsa.europa.eu/en/topics/topic/caffeine
  10. NHS. Foods to avoid in pregnancy: caffeine. 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. 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. PubMed 31623400
  13. McCusker RR et al. Caffeine content of decaffeinated coffee. J Anal Toxicol 2006. 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. PubMed 15448977