←The Library
Sleep and recovery

Coffee and sleep: why the cut-off is earlier than you think

Caffeine lingers long after the buzz fades, and older sleepers may feel it more. When to stop, what is in your cup, and how to find your own cut-off

Thomas Convent, Lifestyle and Optimization
Written by
Thomas Convent
Lifestyle and Optimization
Last reviewed 26 October 202610 sources cited
Read time
9 min read
1 / 11 · Caffeine blocks the signal that you need sleep

You do not feel wired. Your afternoon espresso is a habit, a pause between meetings, and you fall asleep without much trouble. Yet you wake at three, or you wake at seven feeling as if you barely slept, and coffee is the last thing you would suspect, because the buzz wore off hours ago.

That is the confusing part. Caffeine keeps working long after you stop feeling it, and its effect on sleep does not always show up as trouble falling asleep.24 People also differ widely, so a friend's after-dinner espresso tells you little about your own limit.5

This guide walks you through it: what caffeine does in your brain and how long it lingers, what it changes in your night, where the research puts the cut-off, how much is in your cup, why some people seem immune, and how to find your own limit in two weeks.

Start with the mechanism: how caffeine keeps you alert, how long it stays in your body, and what it changes once you are asleep.

Caffeine blocks the signal that you need sleep#

Adenosine is now widely accepted as one of the body's own sleep-regulating substances, and caffeine works by blocking the receptors it acts on, which is why you feel less sleepy.1

For about a century, researchers have studied how caffeine changes sleep and wakefulness. Adenosine emerged as the substance whose receptors caffeine blocks to reduce sleepiness, and research now also looks at how adenosine may influence the body clock.1 Blocking the signal, though, is not the same as having slept.

Adenosine, in one sentence

A substance in the brain that promotes sleep. Caffeine sits on its receptors and blocks them, which is how it keeps you alert.[1]

  • Coffee doesn't affect me
  • I fall asleep fine but wake at 3
  • I need a coffee to get through the afternoon
  • Just one espresso after lunch
  • I wake up tired after eight hours
  • Only decaf after 4 p.m.

A morning coffee can still be there at bedtime#

Caffeine lingers for many hours, and how quickly you clear it varies widely between people.6 In one laboratory study, caffeine from a single dose at breakfast was still measurable at bedtime and still reduced sleep that night.2

Nine healthy men were given 200 mg of caffeine at 7.10 in the morning, about the caffeine in two cups of filter coffee.7 Their saliva levels fell from the peak but were still measurable when the lights went out at 11 p.m., and compared with a placebo, their sleep efficiency and total sleep time that night were reduced.2 It is a small study, but it shows how far a morning dose can reach.

How fast you clear caffeine depends mainly on a liver enzyme, CYP1A2, which handles about 95% of it and varies between people for genetic reasons. Age, sex hormones, liver disease, smoking, diet and a number of medicines also change how long caffeine stays in your body.6 If you take regular medicines, ask your doctor or pharmacist whether any of them interact with caffeine.

Caffeine shortens and lightens the whole night#

Across 24 studies, caffeine reduced total sleep by about 45 minutes, added time awake during the night and cut deep sleep, effects that go well beyond taking longer to fall asleep.4

What changed with caffeineAverage change across 24 studies
Total sleep time45 minutes less
Sleep efficiency (time asleep while in bed)7% lower
Time to fall asleep9 minutes longer
Time awake after first falling asleep12 minutes more
Light sleep (stage N1)About 6 minutes more
Deep sleepAbout 11 minutes less

These are averages from a meta-analysis that pooled studies with different doses and timings.4 An earlier systematic review, co-written at the University of Zurich, reached the same picture: caffeine typically delayed and shortened sleep, made it feel worse, and reduced deep slow-wave sleep while increasing light sleep, wakefulness and arousals.5

So the real question is how long before bed your last cup needs to be.

Your questions · 7 questions

Understand your coffee and sleep better

Seven short questions, and one of our experts reviews your case personally, then goes through it with you on a free call.

On a typical day, how many caffeinated drinks do you have (coffee, black or green tea, cola, energy drinks)?
At what time do you usually have your last caffeinated drink?
+ 5 more questions unfold as soon as you answer one.

See a doctor first, do not wait for a call, if you notice chest pain or palpitations with fainting, loud snoring with gasping or sleepiness while driving.

With that in mind, the practical questions: when to stop, how much is in your cup, and whether a daily habit changes the picture.

About nine hours before bed for a regular cup#

A meta-analysis of 24 studies concluded that a regular coffee, about 107 mg of caffeine, should be drunk at least 8.8 hours before bedtime to avoid losing sleep, and a typical pre-workout drink at least 13.2 hours before.4

The widely repeated six-hour rule comes from a trial in which 400 mg of caffeine, roughly four to five cups of filter coffee,7 disturbed sleep whether it was taken at bedtime, three hours before or six hours before. The authors concluded that substantial caffeine should be avoided for at least six hours before bed.3 The later meta-analysis suggests that even a single regular cup needs a longer gap.4

Your usual bedtimeLast regular coffee by about
10 p.m.1 p.m.
11 p.m.2 p.m.
Midnight3 p.m.

The times are rounded from the 8.8-hour figure,4 and they are averages, not your personal limit. Some people will sleep well with a later cup and others need an earlier one, which is why your own two weeks of notes are the best guide.

An espresso, a tea and a cola all add up#

The European Food Safety Authority gives useful guide values: about 80 mg in an espresso, 90 mg in a cup of filter coffee, 50 mg in a cup of black tea and 40 mg in a can of cola.7

Drink or foodCaffeine, about
Espresso (60 ml)80 mg
Filter coffee (200 ml)90 mg
Black tea (220 ml)50 mg
Cola (355 ml can)40 mg
Energy drink (250 ml can)80 mg
Plain chocolate (50 g bar)25 mg

EFSA notes that a single dose of 100 mg may affect sleep duration and patterns in some adults, particularly close to bedtime. For healthy adults, up to 400 mg spread over the day raises no safety concern, and single doses up to 200 mg are considered safe; during pregnancy and breastfeeding the limit is 200 mg a day.7 Safe for your health, though, is not the same as good for your sleep.

Regular coffee still leaves a trace on your nights#

Habit does not seem to cancel the effect, though it may change it. In a Basel study, men taking caffeine three times a day for ten days slept as long as on placebo, but their dream sleep was delayed and they woke feeling more tired.8

The study followed 20 young men who were regular coffee drinkers through ten days of 150 mg of caffeine three times a day, a placebo and a withdrawal condition. Total sleep and sleep structure did not differ, but the first dream (REM) period came later, and with caffeine the men reported more difficulty waking up and more tiredness on waking. The recording was set up to study one particular part of the night, so it does not translate directly to an ordinary night.8

Whether caffeine affects sleep differently as a one-off dose and as a daily habit is still an open question in the research.1 The Basel authors suggest that waking up less refreshed may itself be a reason to reach for the next coffee.8

REM sleep, in one sentence

Rapid eye movement sleep, the stage of sleep in which most vivid dreaming happens.

Averages only go so far, because people differ. This part looks at why, at what changes with age, and at how to find your own limit.

Genes shape how fast caffeine leaves you#

People differ a lot in how fast they clear caffeine and in how strongly their brain responds to it, partly for genetic reasons.56 Falling asleep easily does not mean caffeine had no effect on the rest of the night.4

Researchers have found common variants in the gene for caffeine's main liver enzyme and in the gene for the adenosine receptor that caffeine blocks, and both influence how much people drink and how their sleep responds.65 Pronounced differences between individuals are seen even among young people.5

That cuts both ways. A colleague's after-dinner espresso says nothing about yours, and your own easy sleep after a late coffee may still hide shorter, lighter sleep, because in the pooled studies caffeine reduced deep sleep and total sleep as well as delaying sleep.4

Older sleepers may feel caffeine more#

The sleep of older adults may be more sensitive to caffeine than that of younger adults, a systematic review concluded.5 In one direct comparison, though, an evening dose disturbed sleep in much the same way at 20 to 30 as at 40 to 60.9

In that study, 24 moderate coffee drinkers took 200 mg of caffeine or a placebo in the evening. In both age groups, caffeine made them take longer to fall asleep, lowered sleep efficiency and shortened sleep; only a few measures of brain activity during sleep changed more in the middle-aged group.9 Age is also one of the factors that change how quickly caffeine is cleared.6

The evidence is mixed rather than settled. If your nights have become lighter in your fifties, moving your coffee earlier is one of the simplest and cheapest things to test.

Which leaves the most useful evidence of all: your own nights.

Two weeks of notes show your own cut-off#

Keep your bedtime and wake time steady, note the time of your last caffeine and how you slept, then move the last cup earlier and compare. Tea, cola, energy drinks and dark chocolate count too.7

Change only the caffeine during the test and keep everything else as steady as you can, so the comparison means something. A sleep tracker can add data, but how rested you feel in the morning matters just as much.

Sometimes coffee is not the cause. This last part covers the signs that need a doctor, and where our work sits alongside theirs.

If coffee is not the cause, look further#

Trouble sleeping for three months or more, loud snoring with pauses in breathing or sleepiness while driving need a doctor rather than a coffee rule. For long-standing insomnia, the recommended first treatment is a structured therapy, not sleep tips alone.10

The American Academy of Sleep Medicine strongly recommends cognitive behavioural therapy for insomnia (CBT-I) for chronic insomnia, and advises against using sleep hygiene advice, such as cutting caffeine, as the only treatment.10 Caffeine timing is worth getting right, but it is one piece of the picture.

We help you test one change at a time#

Our part sits alongside medical care, never instead of it. We help you look at your caffeine next to your sleep, light, meals, movement and stress over two weeks, and change one thing at a time.

The afternoon coffee is rarely the whole story. In our coaching it often answers an afternoon dip that has causes of its own: a short night, a heavy lunch, too little daylight or a demanding day. Swapping the coffee without looking at the dip rarely lasts.

That is what our programmes and our app are for: two weeks of your own nights from your wearable, with what you ate and drank logged next to them. If you would like to look at your pattern, talk it through with our care team on a free call. It is a coaching conversation, not a medical consultation.

Quick answers11 questions this guide covers, in short
How does caffeine keep you awake?

Caffeine blocks the receptors for adenosine, a substance that builds up in the brain while you are awake and promotes sleep. With the receptors blocked you feel less sleepy, but you have not had the sleep your body was asking for. Read the section

How long does caffeine stay in your body?

Many hours, and how long varies widely between people. In one study, caffeine from a single morning dose was still measurable at bedtime and still reduced sleep that night. Read the section

What does caffeine do to your sleep, even if you fall asleep easily?

It shortens and lightens it. Across 24 studies, caffeine reduced total sleep by about 45 minutes, added time awake in the night and cut deep sleep, not just the time it took to fall asleep. Read the section

What time should you have your last coffee?

Earlier than most people think. A meta-analysis of 24 studies concluded that a regular cup of coffee should be drunk at least 8.8 hours before bed to avoid losing sleep, which for an 11 p.m. bedtime means around 2 p.m. Read the section

How much caffeine is in coffee, tea and cola?

Roughly 80 mg in an espresso, 90 mg in a cup of filter coffee, 50 mg in a cup of black tea, 40 mg in a can of cola and 80 mg in a small energy drink, according to the European Food Safety Authority. Read the section

If you drink coffee every day, does it still affect your sleep?

It seems to, although more subtly. In a Basel study, men who took caffeine three times a day for ten days slept as long as on placebo, but their dream sleep was delayed and they woke feeling more tired. Read the section

Why can some people drink an espresso after dinner and still sleep?

Because people differ a lot in how fast they clear caffeine and how strongly their brain responds to it, partly for genetic reasons. Falling asleep easily also does not mean caffeine had no effect on the depth of your sleep. Read the section

Does caffeine affect sleep more as you get older?

It may. A systematic review concluded that older adults' sleep may be more sensitive to caffeine than younger adults', although in one direct comparison a 200 mg evening dose disturbed sleep similarly at 20 to 30 and at 40 to 60. Read the section

How can you find your own caffeine cut-off?

Run a two-week test: keep your bedtime and wake time steady, note the time of your last caffeine and how you slept, then move your last cup earlier and compare. Count tea, cola, energy drinks and chocolate too. Read the section

When is poor sleep about more than coffee?

When moving your coffee earlier changes nothing, when trouble sleeping has lasted three months or more, or when there is loud snoring with pauses in breathing or sleepiness while driving. These need a doctor, and long-standing insomnia has an effective treatment that is not a pill. Read the section

Where does a functional approach fit for coffee and sleep?

Alongside medical care, never instead of it. We help you look at your caffeine next to your sleep, light, meals, movement and stress over two weeks, and change one thing at a time. Read the section

References
  1. Reichert CF, Deboer T, Landolt HP. Adenosine, caffeine, and sleep-wake regulation: state of the science and perspectives. J Sleep Res. 2022;31(4):e13597. PMID : 35575450. Link
  2. Landolt HP, Werth E, Borbély AA, Dijk DJ. Caffeine intake (200 mg) in the morning affects human sleep and EEG power spectra at night. Brain Res. 1995;675(1-2):67-74. PMID : 7796154. Link
  3. Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013;9(11):1195-1200. PMID : 24235903. Link
  4. Gardiner C, Weakley J, Burke LM, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Med Rev. 2023;69:101764. PMID : 36870101. Link
  5. Clark I, Landolt HP. Coffee, caffeine, and sleep: a systematic review of epidemiological studies and randomized controlled trials. Sleep Med Rev. 2017;31:70-78. PMID : 26899133. Link
  6. Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev. 2018;70(2):384-411. PMID : 29514871. Link
  7. European Food Safety Authority. Caffeine [topic page]. Parma: EFSA; accessed 26 October 2026. Link
  8. Weibel J, Lin YS, Landolt HP, et al. Regular caffeine intake delays REM sleep promotion and attenuates sleep quality in healthy men. J Biol Rhythms. 2021;36(4):384-394. PMID : 34024173. Link
  9. Drapeau C, Hamel-Hébert I, Robillard R, et al. Challenging sleep in aging: the effects of 200 mg of caffeine during the evening in young and middle-aged moderate caffeine consumers. J Sleep Res. 2006;15(2):133-141. PMID : 16704567. Link
  10. Edinger JD, Arnedt JT, Bertisch SM, et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. J Clin Sleep Med. 2021;17(2):255-262. PMID : 33164742. Link

Researched and drafted with the help of AI, checked against its sources, then reviewed and approved by the FunctionAlps editorial team, which holds editorial responsibility for it. How we use AI

Articles published by FunctionAlps are educational and written within ASCA and EMR scope. They do not replace personalised clinical advice. When findings warrant medical evaluation, we coordinate with a referring physician.

Reading is one thing
a protocol is another

A focused one-on-one with Alessandra, a personalised written protocol, and the tests that will sharpen it.