Skip to main content
Sleep Science

Caffeine and Sleep

For most adults with a 10–11pm bedtime, the evidence-based caffeine cutoff falls in the late morning: two half-lives before bed, when caffeine has dropped below 25% of its peak. For an average metaboliser with an 11pm bedtime that is around 9am, and slow metabolisers should stop earlier still. Caffeine's 5 to 9 hour half-life keeps even a mid-afternoon coffee well above that threshold at bedtime, and Drake (2013) found 400mg taken 6 hours before bed cut total sleep by more than an hour even when people fell asleep easily.

By Reede Taylor · Published May 24, 2026 · Reviewed August 6, 2026

How caffeine works: blocking adenosine

Caffeine's mechanism is both elegant and deceptive. It doesn't create energy, it blocks a signal that tells you you're tired. Throughout the day, a metabolic by-product called adenosine accumulates in the brain. Adenosine binds to receptors that progressively suppress neural activity, creating the feeling of mounting sleepiness that peaks in the evening. This adenosine build-up is called "sleep pressure" or "Process S."

Caffeine is structurally similar to adenosine and competes for the same receptors. When you drink coffee, caffeine molecules occupy those receptors, preventing adenosine from binding, not destroying the adenosine, just blocking the signal. Meanwhile, adenosine continues to accumulate in the background. When caffeine is metabolised and clears the receptors hours later, all that backed-up adenosine floods in simultaneously, creating the classic "caffeine crash."

The half-life problem

The half-life of caffeine, the time for 50% of it to be cleared from your bloodstream, ranges from about 5 to 9 hours in healthy adults, averaging around 7. This means a 200mg coffee at 2pm leaves 100mg active at 7–9pm. That's a meaningful stimulant load at the time most people are trying to wind down for sleep. Two calculators apply this decay math for you, from opposite directions: the caffeine half-life calculator tells you how much is in your system right now and at bedtime, while the caffeine cutoff calculator works backward from your bedtime to the latest time you can drink.

A landmark 2013 study by Drake et al. found that 400mg of caffeine consumed 6 hours before bedtime significantly reduced total sleep time, by more than an hour, even though the subjects were able to fall asleep. The caffeine didn't prevent sleep onset; it degraded sleep architecture throughout the night in ways the subjects weren't fully aware of. Self-reported sleep quality didn't capture what polysomnography revealed.

What caffeine does to sleep architecture

Even when caffeine doesn't prevent you from falling asleep, it degrades the quality of the sleep you get. EEG studies consistently show that caffeine reduces slow-wave sleep (SWS / N3 deep sleep), the most restorative stage, responsible for physical recovery, immune function, and growth hormone release. It also increases time spent in lighter N1 and N2 stages.

The effect on REM sleep is mixed, some studies show REM suppression, others show REM rebound in later cycles, but slow-wave suppression is consistent across the literature. This means that regular evening caffeine can produce a pattern where you sleep 7–8 hours but wake feeling unrested because the deep, restorative phase is being compressed.

Individual metabolism: why cutoff times vary

Caffeine is metabolised primarily by the enzyme CYP1A2 in the liver. The activity of this enzyme is largely genetically determined, with significant variation between individuals. The CYP1A2 gene has a common variant (CYP1A2*1F) that roughly doubles caffeine half-life in people who carry two copies, so what takes 5 hours to clear in a fast metaboliser takes 10 hours in a slow one.

Several other factors also affect caffeine metabolism: liver function, smoking status (smokers metabolise caffeine about twice as fast), oral contraceptives and certain medications (which can slow it significantly), and pregnancy (where half-life can extend to 15+ hours in the third trimester).

This variability is why a single recommended cutoff time is misleading. The Caffeine Calculator calculates your personal cutoff based on your metabolism type (fast, average, or sensitive) and target bedtime, targeting no more than 25% of peak caffeine remaining at sleep time, which is two half-lives of clearance.

The caffeine tolerance trap

Regular caffeine users develop tolerance as the brain upregulates adenosine receptors in response to chronic blockade. This means you need progressively more caffeine to get the same alertness effect, but critically, caffeine's sleep-disrupting properties don't habituate in the same way. You feel less alert from caffeine, but the polysomnographic disruption to sleep architecture persists.

This creates a particularly insidious cycle: disrupted sleep increases sleepiness, sleepiness increases caffeine consumption, which further disrupts sleep. Many people who feel they "need" coffee to function normally are actually recovering from caffeine-induced sleep debt, not from an underlying energy deficit that caffeine is solving.

Practical guidelines

The most evidence-consistent guidelines for caffeine and sleep health are: allow about two half-lives of clearance before your target bedtime so caffeine sits below 25% of its peak (roughly 14 hours for an average metaboliser, and longer for sensitive ones), keep the last dose to the early morning rather than the afternoon, and hold total daily intake below 400mg (roughly 3–4 standard cups of coffee), which is generally considered safe for healthy adults.

If you're in active sleep debt recovery, it's worth temporarily extending the cutoff window further than you normally would, your sleep is already compromised and providing every possible advantage to sleep quality speeds the recovery process.

Frequently asked questions

How long does caffeine stay in your system?

Caffeine has a half-life of about 5 to 9 hours in adults, averaging around 7. If you drink a 200mg cup of coffee at 2pm, roughly 100mg is still active at 7–9pm. Full elimination takes 24+ hours, but the clinically significant effects on sleep onset occur above about 40mg.

Does caffeine affect deep sleep even if you fall asleep fine?

Yes. Drake et al. (2013) found that 400mg of caffeine consumed 6 hours before bed reduced total sleep time by more than an hour even when subjects had no trouble falling asleep. Caffeine specifically suppresses slow-wave deep sleep (N3), which is critical for physical recovery, immune function, and growth hormone release.

What is the best time to stop drinking caffeine?

The research-backed target is to have caffeine below 25% of its peak by bedtime, which takes two half-lives of clearance. For an average metaboliser (about a 7-hour half-life) with an 11pm bedtime, that puts the cutoff around 9am. People who metabolise caffeine slowly (CYP1A2 slow metabolisers, roughly 50% of adults) should stop earlier still. This is stricter than the old 'stop by 2pm' rule of thumb, but it reflects Drake et al. (2013), who found 400mg of caffeine 6 hours before bed still cut total sleep by more than an hour. The Caffeine Calculator personalises this based on your sensitivity and bedtime.

Does tea have enough caffeine to affect sleep?

Black tea contains 40–70mg per cup; green tea 25–50mg. Both are enough to meaningfully affect sleep if consumed in the evening. Herbal teas (chamomile, peppermint) contain no caffeine and are safe at any time.

Does quitting caffeine improve sleep?

For many people, yes. Because caffeine suppresses slow-wave deep sleep and can shorten total sleep time, cutting it out or cutting back tends to increase deep sleep and sleep efficiency once your system adjusts. The catch is a short withdrawal period: headaches, fatigue, and low mood are common for the first two to nine days as adenosine receptors return to baseline. Sleep usually improves after that. You do not have to quit entirely to benefit, though; moving your last dose earlier in the day captures much of the gain.

Does caffeine affect sleep differently if you have ADHD?

Some people with ADHD find caffeine calming or focusing rather than stimulating, because of how it interacts with dopamine signalling, and a few use it for mild symptom relief. That pharmacodynamic difference does not protect their sleep, though: caffeine still blocks adenosine and suppresses deep sleep the same way, and poor sleep tends to worsen attention symptoms in a feedback loop. If you have ADHD and use caffeine, the timing of your last dose still matters, and a doctor is the right person to weigh caffeine against any prescribed stimulant medication.

Key research

  • 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. 400mg of caffeine consumed 6 hours before sleep reduced total sleep time by more than an hour.
  • Landolt, H.P. et al. (2004). Caffeine attenuates waking and sleep electroencephalographic markers of sleep homeostasis in humans. Neuropsychopharmacology, 29(10), 1933–1939. Caffeine suppresses slow-wave (N3) deep sleep in proportion to dose.
  • Nehlig, A. et al. (1992). Caffeine and the central nervous system: mechanisms of action, biochemical, metabolic and psychostimulant effects. Brain Research Reviews, 17(2), 139–170. Mechanism: adenosine receptor antagonism.

Educational information, not medical advice. Consult a healthcare provider for sleep disorders or before taking any supplement.