There is caffeine in your bloodstream right now that you have entirely forgotten drinking. Not the espresso after lunch you would own up to — the one before that, the office pot at eleven, the half-finished cup you carried into a meeting and abandoned. Caffeine does not wear off the way the word suggests. It halves, and halves, and halves, on a schedule that has nothing to do with when you stop feeling it.
Caffeine's mean half-life is about five hours, so a 2 p.m. mug still has roughly a quarter of its dose circulating at midnight. But dose matters as much as timing: in a 2025 trial, 100 mg four hours before bed did nothing measurable, while 400 mg disrupted sleep taken up to twelve hours out.
Nothing about caffeine wears off.
Caffeine leaves the body by a first-order process, which is a technical way of saying that a fixed proportion goes every hour rather than a fixed amount. In healthy adults the mean plasma half-life is about five hours, according to the pharmacology review in the Institute of Medicine's Caffeine for the Sustainment of Mental Task Performance. That single number does most of the work here.
Take one ordinary mug at 2 p.m. We will call it 100 mg, which is a modelling assumption rather than a measurement — more on why in a moment. Five hours later half of it is gone. At midnight, ten hours in, you are down to a quarter. When the alarm goes off there is still a measurable trace of yesterday afternoon in you.
Now run the same clock on a genuinely caffeinated day: 400 mg, roughly four mugs, and also the dose used in the sleep trials below.
| Clock | One 100 mg mug | A 400 mg day |
|---|---|---|
| 2 p.m. | 100 mg | 400 mg |
| 7 p.m. | 50 mg | 200 mg |
| Midnight | 25 mg | 100 mg |
| 5 a.m. | 12.5 mg | 50 mg |
| 10 a.m. | 6 mg | 25 mg |
At midnight on the 400 mg day you are carrying 100 mg. That is not a residue. That is a fresh cup of coffee, poured at bedtime.
The clock rule is really a dose rule.
The temptation is to convert the arithmetic into a commandment: no caffeine after 2 p.m. The trials do not quite support that, and the way they fail to support it is the useful part.
In 2013 Christopher Drake and colleagues gave people 400 mg of caffeine at bedtime, three hours before bed, and six hours before bed. Even at six hours out, objectively recorded total sleep time fell by more than an hour. The finding that matters is what the participants said afterwards: their own reports did not register the disruption. The sleep was gone and the memory of losing it was not there.
Then in 2025 a randomised crossover trial by Gardiner and colleagues did what the field needed and separated dose from timing. Twenty-three moderate caffeine consumers took 100 mg or 400 mg at four, eight, or twelve hours before bed. The 100 mg dose produced no significant effect on measured or reported sleep at any of those timings, including four hours before bed. The 400 mg dose delayed sleep onset and altered sleep architecture when taken within twelve hours of bedtime, and fragmented sleep when taken within eight.
Read the two together and the rule changes shape. It is not a clock rule, it is a dose-times-time rule. One modest cup in the late afternoon looks very different from a 20-ounce cold brew at noon, and it is the second one the evidence objects to.
You never feel caffeine leave. You feel yourself stop noticing it. Those are different events, hours apart.
The whole problem, in one lineFive hours is an average, and you are not one.
Reported half-lives range from about 1.5 to 9.5 hours across healthy adults, most of that variation sitting in the liver enzyme CYP1A2, which handles the overwhelming majority of caffeine clearance. Oral contraceptives roughly double the half-life. Pregnancy extends it further, particularly late on. Smoking shortens it.
Run our 2 p.m. mug through the extremes and the spread is almost comic. A fast metabolizer at a 1.5-hour half-life has about 1 mg left at midnight — nothing at all. A slow metabolizer at 9.5 hours still has 48 mg, half the original cup, from the same coffee at the same hour. Someone on a combined oral contraceptive sits closer to the second case than the first.
This is the point where an article should stop pretending to be a clinic. If you are pregnant, taking medication, or dealing with sleep that is genuinely not working, talk to your doctor rather than to a bedding company's blog.
Nor do you actually know what you drank. When researchers bought the same nominally identical decaffeinated espresso from the same outlet six times, the caffeine content ranged from 3.0 to 15.8 mg a shot. Ten decaffeinated coffees from ten different outlets ran from 0 to 13.9 mg per 16-ounce serving. Decaf is not zero. It is small and variable — and if you are the 9.5-hour metabolizer, that distinction is not academic.
The panic genre overstates it.
Honesty requires stepping off the alarm. In 2021 Janine Weibel and colleagues gave habitual coffee drinkers 150 mg three times a day for ten days and measured sleep in a laboratory. The effect on sleep architecture and subjective sleep quality was, in their words, negligible. What did change was REM sleep, which was pushed later into the night.
That result deserves its caveats. The doses were spread across the morning and early afternoon rather than dropped near bedtime, the participants were young men, and habitual heavy consumers may simply be a different population from someone reacting to an unusual double shot. But it is a real, well-conducted trial, and it does not say what the caffeine-panic genre says. The studies that find dramatic damage use large doses close to bedtime. The studies that use ordinary doses at ordinary times mostly find ordinary sleep. We made a similar argument about the field's most famous book in Why We Sleep, Chapter One.
Count milligrams, not cups.
| Step | What it means |
|---|---|
| Count mg, not cups | A 16-ounce drip is not a mug, and nobody's cup is 100 mg by law |
| Last big dose, minus ten hours | For a midnight sleeper that means finishing the serious coffee by two |
| Late means small | The 2025 trial found nothing measurable from 100 mg even four hours out |
| Decaf is small, not zero | 0 to 13.9 mg per 16-ounce serving in the measured samples |
| Test yourself, not the average | Move the coffee earlier for a week and watch what happens |
The reason the last step is on the list rather than the first is that your own half-life is not printed on anything. The population average tells you what to try; only the week of testing tells you whether you are the 1.5-hour case or the 9.5-hour one.
One closing note, and we should disclose that we sell bedding, so weigh it accordingly: caffeine is the variable people most often overlook, and the mattress is the one they most often replace. If you have been waking hot at three in the morning and blaming the bed, the coffee is cheaper to test first — and if the heat really is the problem, we wrote about bedroom temperature and about whether fabric actually helps before we ever tried to sell you anything.
If the heat is the real variable
100% rayon (viscose) from bamboo · 17-inch pockets · free shipping over $75 · from $129.95.
The questions people also ask.
How many hours before bed should I stop drinking coffee?
A workable default is to finish anything large about ten hours before you sleep, and keep whatever comes after that near a single small cup.
Is caffeine really still in my system at midnight?
Does decaf coffee have caffeine in it?
Why does caffeine not seem to affect my sleep?
The cheap experiment is to shift your last dose several hours earlier for a week. If nothing changes, you have your answer, and it cost you nothing.


