Caffeine and Sleep: How Coffee Affects Your Rest
Caffeine doesn't just keep you awake — even when you do fall asleep, leftover caffeine can quietly cut into the deep sleep that makes you feel rested.
How caffeine keeps you awake
As you stay awake, a molecule called adenosine builds up and creates "sleep pressure". Caffeine works by blocking adenosine receptors, masking that signal. The catch: caffeine lingers (see how long caffeine stays in your system), so it can still be blocking adenosine at bedtime.
What the research shows
In a controlled 2013 study, Drake and colleagues gave participants 400 mg of caffeine 0, 3, or 6 hours before bed. Even the dose taken 6 hours before bedtime significantly reduced total sleep time — and participants often couldn't tell. Other research links evening caffeine with longer sleep onset and less deep (slow-wave) sleep.
"I sleep fine after coffee" — maybe not fully
Falling asleep and sleeping well aren't the same. Caffeine can lighten and fragment sleep and trim deep sleep, so you can clock a full night yet wake up under-rested. Because the effect is often invisible in the moment, your own data is the most honest guide.
Find your personal pattern
General studies describe averages; you are not an average. The useful question is whether your late caffeine is associated with your worse nights. CaffSense logs caffeine, models your live half-life curve, and — after about a week of nights — looks for an association with your Apple Health sleep. It always shows how many nights an insight is based on, and never makes promises.
Practical steps
- Set a caffeine cutoff — see when to stop drinking coffee before bed.
- Keep bedtime consistent so caffeine isn't the only variable.
- Track for two weeks before judging — single nights are noisy.
Sources
- Drake et al. (2013), J Clin Sleep Med — caffeine 0/3/6 h before bed.
- Sleep Foundation — caffeine and sleep.
- EFSA (2015) — caffeine safety and half-life.
This article is observational wellness information only, not medical advice, and should not be used to diagnose, treat, cure, or prevent any condition.