Free shipping over R750 · Physician-led online insomnia care · Johannesburg & nationwide delivery
← Journal

Caffeine and Sleep: Half-Life, Cut-Off Times and the Coffee You Think Is Fine

Slumbr Clinical Team caffeine, sleep onset
Medically reviewed by Dr Nassim Sherif, MBChB · Last reviewed August 2026

The most useful fact about caffeine and sleep is not that it keeps you awake. Everyone knows that. It is that caffeine can measurably degrade your sleep without you noticing, which means "I can drink coffee at night and sleep fine" is not the reassurance people take it for. In one controlled study, a dose of caffeine taken six hours before bed reduced objectively measured sleep by more than an hour, and the people it happened to did not report any disturbance. Their sleep was worse. Their impression of their sleep was not.

Key takeaways

  • Caffeine works by blocking the chemical signal that tells your brain how long you have been awake. It masks sleep pressure rather than removing it.
  • Its half-life averages around five hours, but the individual range is wide, and several common factors extend it substantially.
  • In a controlled study, 400 mg of caffeine six hours before bed cut measured sleep time by over an hour, without participants noticing.
  • Being able to fall asleep after coffee tells you nothing about the quality of the sleep that follows.
  • A practical cut-off for most people is early afternoon, earlier if you sleep badly.

What caffeine actually does

While you are awake, a molecule called adenosine accumulates in the brain. The longer you have been up, the more of it there is, and the stronger the pressure to sleep. It is one of the two main systems governing when you feel sleepy, alongside your body clock.

Caffeine works by blocking the receptors adenosine acts on. The adenosine is still there and still accumulating. You simply stop receiving the message.

Two consequences follow, and both matter.

The sleep pressure is deferred, not cancelled. When caffeine clears, the accumulated adenosine is still waiting, which is the afternoon crash.

Blocking the signal does not require you to feel wired. This is the part people miss. Caffeine can be quietly interfering with the depth and continuity of your sleep at concentrations well below the level that makes you feel stimulated.

The study worth knowing about

In 2013, researchers gave healthy sleepers 400 mg of caffeine, or a placebo, at three time points: immediately before bed, three hours before bed, and six hours before bed. They measured sleep objectively rather than relying on self-report.

All three timings significantly disrupted sleep, including the six-hour condition. At six hours before bedtime, objectively measured total sleep time fell by more than an hour compared with placebo.

The striking part was the mismatch: participants' own reports of how they had slept did not pick up the disruption. Their sleep was measurably worse and they could not tell.

The honest caveats. This was a small study, twelve healthy normal sleepers, and 400 mg is a substantial dose, in the region of two to three cups of coffee rather than a single cup. It does not prove that one flat white at 4pm costs you an hour of sleep. What it does establish is the principle that matters here: caffeine consumed well before bedtime can degrade sleep measurably while feeling harmless. Your subjective sense of "it does not affect me" is not a reliable instrument.

The half-life, and why yours may not be average

Caffeine's half-life averages roughly five hours. That means five hours after your last cup, about half the caffeine is still circulating. After ten hours, roughly a quarter. A 2pm coffee is still meaningfully present at midnight.

Individual variation is wide, roughly three to seven hours, and several things shift it:

  • Genetics. Variation in the liver enzyme that clears caffeine is the main reason two people can drink the same espresso with completely different consequences.
  • Oral contraceptives, which prolong caffeine's clearance.
  • Pregnancy, which prolongs it substantially, particularly later on.
  • Smoking, which speeds it up, meaning caffeine tolerance can change noticeably on quitting.
  • Age and liver function.

So there is no universal cut-off time. If you are a slow metaboliser, a lunchtime coffee is an evening problem.

Where the caffeine actually is

Coffee is the obvious source and not the only one. Black and green tea contain caffeine, in smaller amounts than coffee but enough to matter for sensitive people late in the day. Energy drinks are often the largest single source in a young person's day. Cola drinks contain it. So does dark chocolate, in modest quantities.

The genuinely useful South African detail: rooibos is naturally caffeine-free, which makes it the straightforward evening substitute if the ritual of a hot drink is what you actually want. Green and black tea are not caffeine-free, despite frequently being treated as the gentle option.

What to do with this

Set a cut-off in the early afternoon. For most people, stopping caffeine somewhere around midday to 2pm is a sensible default. If you sleep badly, move it earlier rather than later.

Test it properly. Two weeks with a firm early cut-off, then judge. A couple of days proves nothing, and the first few days may be worse because of withdrawal headache and fatigue.

Watch the loop. Poor sleep leads to more caffeine, which further degrades sleep, which requires more caffeine. This is one of the most common self-perpetuating cycles in chronic insomnia, and breaking it usually requires a deliberate step down rather than a gradual drift.

Do not use "I fall asleep fine" as evidence. Sleep onset is not the outcome caffeine damages most. Continuity and depth are, and those are exactly what you cannot self-assess.

Reduce gradually if you drink a lot. Abrupt cessation produces headache, fatigue and irritability for several days, which is unpleasant enough to derail the attempt.

Frequently asked questions

How long before bed should I stop drinking coffee? For most people an early-afternoon cut-off is a reasonable default, and earlier if you sleep poorly. Caffeine's half-life averages around five hours, so a mid-afternoon coffee is still substantially present at bedtime. Controlled data show disruption even at six hours before bed.

Does caffeine still affect me if I can fall asleep after it? Yes, potentially. Falling asleep is not the part caffeine damages most. In controlled study conditions, sleep was measurably shortened by caffeine taken six hours earlier while participants reported no disturbance at all. Your impression of your sleep is not a reliable measure of it.

How long does caffeine stay in your system? The half-life averages roughly five hours, so about half remains after five hours and a quarter after ten. The individual range is wide, roughly three to seven hours, and oral contraceptives and pregnancy prolong it while smoking shortens it.

Does tea have less caffeine than coffee? Generally yes, though it varies by type and preparation, and it is not caffeine-free. Rooibos is naturally caffeine-free, which makes it the practical evening alternative in South Africa if what you want is a hot drink rather than a stimulant.

Will cutting caffeine cure my insomnia? Unlikely on its own if you have chronic insomnia, though it removes a genuine aggravating factor and is worth doing. Chronic insomnia is maintained by arousal and conditioning, and the first-line treatment for it is CBT-I rather than any single lifestyle change.


This article is educational and is not a diagnosis or a substitute for medical advice. Slumbr does not provide emergency care. If you are in crisis, seek urgent in-person help.

Cut the caffeine and still not sleeping? Take the free Slumbr Sleep Pattern Assessment™ to find out which sleep pattern you have and what actually treats it. Or book an online consultation with a specialist physician.


Not sure which path fits? Compare your sleep-care options — CBT-I vs medication, non-prescription vs prescription, and online vs in-person care →

← Back to the Journal Take the free Sleep Pattern Assessment™