There's a quiet confidence most coffee drinkers carry: I can have an espresso after dinner, I sleep fine. The sleep arrives on time. The eyes close. Case closed.
Except the measurable version of "fine" and the felt version keep coming apart in the research. People drink caffeine late, report normal sleep, and then show on a sleep monitor that they lost almost an hour of it. That gap β between what caffeine feels like at bedtime and what it's actually doing to the night β is the real story.
What caffeine is actually doing in your brain
Across your waking hours, a molecule called adenosine builds up in the brain. Rising adenosine is a big part of what we feel as sleep pressure: the gentle gravity pulling you toward bed by 10 or 11pm.
Caffeine is structurally close enough to adenosine that it slots into the same receptors β mainly A1 and A2A β without activating them. It's a blocker, not a signal. While it's parked there, your brain can't fully read the sleep-pressure message adenosine is trying to deliver, which is why alertness holds for a few hours after a cup.
The relevant point for sleep: that blockade doesn't end when you stop feeling buzzed. It ends when enough caffeine has been metabolised and cleared, and that timeline is longer than most people estimate.
How long does caffeine actually last?
Caffeine's half-life β the time it takes your body to clear roughly half a dose β is often quoted as around 5 hours, but the honest range in healthy adults runs from about 2 to 10 hours, depending on the person.
The 2023 meta-analysis in Sleep Medicine Reviews notes that this wide range is exactly why a single universal cutoff is tricky. Most of the variation sits in one liver enzyme β CYP1A2 β which does the heavy lifting on caffeine metabolism. Smokers tend to clear caffeine faster. Older adults, people on certain medications, and those in later pregnancy tend to clear it slower, sometimes dramatically so.
Practically, this means your friend who sleeps fine after a 9pm espresso and you may genuinely be metabolising the same drink at different speeds. The uncomfortable corollary: you don't actually know which end of that range you're on without testing.
How many hours before bed should you stop?
This is the question the research has quietly been converging on. The headline numbers come from a 2023 meta-analysis by Gardiner and colleagues, which pooled 24 studies on caffeine and sleep. The authors modelled when caffeine would stop causing measurable loss of total sleep time at different doses, and published two cutoffs:
| Caffeine source | Dose | Hours before bed |
|---|---|---|
| Standard brewed coffee (250 ml) | ~107 mg | at least 8.8 hours |
| Pre-workout supplement (standard serve) | ~217 mg | at least 13.2 hours |
Across the included studies, caffeine on average cut total sleep time by about 45 minutes, dropped sleep efficiency by 7%, lengthened time to fall asleep by 9 minutes, and added 12 minutes of wake time after falling asleep. Deep sleep (N3) fell by about 11 minutes.
The authors are careful: these are "starting point" numbers from pooled data, not personal prescriptions. But they're useful anchors. If you want 11pm sleep, a brewed coffee at or before ~2pm is roughly the research-backed line. Pre-workout before an evening gym session is the trickier one β a 7pm scoop sits well inside the window it can still cost you sleep.
What about "I had coffee late and slept fine"?
This is where the Drake and colleagues study from 2013 β small but still one of the most quoted β gets interesting. They gave 12 healthy sleepers a 400 mg dose of caffeine (roughly two to three cups of coffee) at bedtime, three hours before bed, or six hours before bed, and compared each night with a placebo.
Objective sleep monitoring showed each timing cost about 1.1 to 1.2 hours of total sleep time versus placebo. All three were statistically significant. The six-hour condition β caffeine taken at 5pm for an 11pm bedtime β still produced measurable disruption.
The subjective layer is the point that doesn't make headlines enough. Participants' sleep diaries picked up the damage from the bedtime and three-hour conditions. At six hours, people felt they'd slept normally. Only the monitor caught it. The authors wrote plainly that people tend to be bad detectors of their own caffeine-driven sleep loss, especially from afternoon doses.
This is why "I sleep fine on it" isn't quite the proof it feels like. You might. You also might be missing a chunk of deep sleep without noticing it, which is a different problem that shows up later as flatter mornings, higher resting heart rate, and the vague feeling that your sleep "isn't working" even when the hours look right on paper.
A reasonable cutoff for Singapore schedules
A workable starting template, built from the numbers above rather than invented:
- If your bedtime is 11pm: last brewed coffee by around 2pm, last pre-workout dose by around 10am.
- If your bedtime is midnight: push each of those by an hour.
- If you nap or want to protect deep sleep particularly hard: aim earlier still, closer to lunchtime.
- If you're a slow metaboliser β markers include jitters from a single cup, caffeine that still buzzes four hours in, or caffeine clearly keeping you up when taken mid-afternoon β treat the cutoff as a floor, not a target.
The honest unknown here is personal variation. A sensible two-week test: set a cutoff ~9 hours before your usual bedtime, hold it steady, and judge your sleep from the mornings β energy on waking, how you feel at 3pm β rather than from how tired you feel at bedtime, which caffeine is specifically good at masking.
Where afternoon swaps actually help
The practical move most people need isn't quitting coffee; it's shifting the second or third cup out of the restricted zone. That means something warm, familiar and ritualistic to replace the 3pm cup, which is where naturally caffeine-free herbal infusions earn their place in a day. Lemongrass, ginger, pandan and roselle brews aren't magic sleep aids β they're just drinks that don't push against your adenosine system when you least want them to.
If you keep a kettle at your desk, pre-portioned sachets are the lowest-friction version. Spa Foods' Organic Lemongrass Teabags are a straightforward swap for the afternoon mug, and the Aged Ginger Tea is a warmer option for cold-office days β both are single-ingredient, sugar-free, and happen to be made in Singapore. Neither will do what a strong coffee does; the whole point is that it shouldn't.
Pick a cutoff about nine hours before your intended bedtime, hold it for two weeks, and judge the result from how your mornings feel β not from how awake you feel at midnight, which is exactly the signal caffeine is good at hiding.