
It’s nearly 3 a.m. and Joan has just flung her shoe at my head.
Joan suffered from bipolar disorder, anxiety, and poor aim. The shoe missed its target. A nurse intervened before anything else could be hurled.
I forget why Joan was angry – I was working the graveyard shift at a psychiatric hospital and remember very little from those groggy hours – but I do recall being baffled that the staff let her drink coffee all day, including a cup with dinner. Surely this was adding fuel to the fire.
I thought of Joan on Monday when I discovered, in The Washington Post, an Ask a Doctor video entitled “The exact time to stop drinking coffee for better sleep”.
I can’t tell when this 1:17 minute video was originally posted, but as of today it’s still among the first you see on the landing page of WaPo‘s Well+Being section.
In spite of its recent woes, WaPo still has 2 million+ digital subscribers who may see this video. The public health messaging needs to be on target. Could there really be an “exact time” to stop drinking coffee? Would knowing the details have helped Joan? Would it help someone like me, who stops around 1 p.m. but still might not be getting the timing right?
One could hope. Advice on this topic can be maddeningly vague. As noted in a recent article,
“The American Academy of Sleep Medicine warns that caffeine may cause sleep disruption if taken “too close to bedtime”, while the Sleep Health Foundation suggests consumers should “avoid caffeine close to bedtime”. The lack of precision in these recommendations may limit the ability of consumers to make evidence-based decisions regarding the timing of their caffeine intake.”
So, in this week’s post I want to discuss two apparently simple questions:
1. What time of day should you stop having caffeine?
Specifically, how late in the day can you have caffeine without undermining your sleep?
2. Who should you trust for advice on this topic?
Should you listen to experts, such as Dr. Trisha Pasricha, the Ask a Doctor creator? How about an AI chatbot?
Ordinarily I’d say: Trust your instincts. Since each of us reacts to caffeine differently, all that matters at the end of the day – literally – is your personal experience. However, recent studies show that instinct is fallible here. If caffeine is taken more than 6 to 8 hours before bedtime, people report no effects on their sleep even when objective measures show diminished quality (in particular, more time awake during the night).
In short, you should probably listen to your body and to advice that’s grounded in scientific evidence. The science might surprise you.
I’ll start with some background.
Caffeine metabolism
There’s a myth that caffeine gives you energy. It’s more accurate to say that caffeine prevents a molecule called adenosine from making you sleepy. It’s not really an energy source, as often claimed.
Caffeine resembles adenosine closely enough that it binds to receptors in brain cells that are sensitive to adenosine. As a result, the adenosine gets blocked out. It can’t start exerting its soporific effects until your liver has metabolized (i.e., broken down) enough of the caffeine.
People differ in how quickly they metabolize caffeine, owing in part to which variants of a gene called CYP1A2 inhabit their DNA. Quicker metabolism means that caffeine spends less time in a person’s system, and so, as you’d expect, the effects disappear more rapidly.
But that’s not the whole story. People also differ in how intensely they react to caffeine, thanks in part to variants of the ADORA2A gene. Given the same quantity, some people get more “jittery” than others.
So, from a practical perspective, two important questions you might ask are: (i) How long does caffeine stay in my system, and (ii) how strongly does it affect me?
You might think that only the first question matters when deciding when to have your last caffeine of the day. Even a person who gets super jittery might enjoy caffeine in the evening and sleep well if their metabolism is speedy enough, right?
Not exactly.
Recent evidence suggests that both speed and strength of reaction matter. Public health messaging often fails to acknowledge this. To illustrate, let’s have a close look at that Ask a Doctor video.
Ask who?
The video draws all of its scientific claims from a 2023 meta-analysis (which was easy to track down, because the video includes a still of the first page).
According to the first half of the video,
“Scientists have figured out the best time of day to have your last cup in order to get the best night’s sleep, and it’s earlier than you think... They found that having your last cup of the day 8.8 hours before bedtime was the best way for the average person to sleep more and fall asleep more quickly....”
In fact, the meta-analysis only hints that in order to prevent an average reduction in sleep time among a large group of people, their last cup of coffee should be consumed no later than 8.8 hours before bedtime.
This is one-size-fits-all advice. You personally are not a large group of people. And, as I’ll explain later, the meta-analysis showed different cut-offs depending how much caffeine is consumed. Timing isn’t everything.
The second half of the video acknowledges individual differences:
“Some of us may be that lucky few that can have espresso at 11 p.m. and then sleep like babies. Or maybe you’re somebody who has a little coffee at 10 a.m. and then it’s midnight and you’re staring at the ceiling wondering if you’re going to die... If you’re someone like me, who drinks coffee in the afternoon, but then actually just feels really tired and wired...try having your last cup of coffee a little earlier than you thought you should. See what happens.”
This checks off most of the boxes for good public health messaging. The advice is concrete, clear, realistic, and grounded in a rationale. Still, it’s problematic:
—It perpetuates a myth that there are two kinds of people: fast vs. slow caffeine metabolizers. (The data suggest a continuum.)
—It focuses exclusively on coffee. (Caffeine is caffeine, regardless of source.)
—It fails to note that quantity of caffeine is critical too. This is exactly what the 2023 meta-analysis, as well as studies published over the past three months, have shown:
Dose matters
The 2023 meta-analysis estimated that a cup of coffee containing 107 mg of caffeine would reduce average sleep time if consumed 8.8 hours or less before bedtime.
The meta-analysis also estimated that 217.5 mg of caffeine would reduce average sleep time starting if consumed 13.2 hours or less before bedtime.
That’s a huge difference! Someone drinking two cups of coffee at a time would have to stop more than 4 hours earlier than someone drinking just one.
The practical takeaway is that you shouldn’t just be thinking about the timing of your last caffeine of the day. Amount of caffeine is important too.
Total caffeine intake may also play a role. A study published this June found no self-reported sleep disturbances from total daily intake of less than 400 mg. But even 101-200 mg within 8 hours of bedtime increased the odds of sleeping less than 6 hours.
Now, if you’re looking for practical advice, things are starting to get a little complicated. Timing of caffeine intake matters. Amount matters. Amount relative to body size matters. (Joan, the shoe-hurler, was a tiny person and may have been more strongly affected by the same amount of coffee than others would be.) Frequency of use matters, in the sense that habitual users respond more poorly to cutting back than occasional users do. And all of these influences are constrained somewhat by genetically-driven differences in metabolism and sensitivity.
So, what should you do?
Three suggestions
Perhaps you’re sleeping well and considering a change to your caffeine habits. Perhaps you’re not sleeping well and suspect that caffeine is the culprit. Either way, here are three suggestions. (The first two are meant to help frame the issues; the third one focuses on what you might actually do.)
1. Take concrete advice with a grain of salt.
The first five hits from a Google search on caffeine and sleep include this statement from Houston Methodist Hospital:
““Caffeine tolerance can vary from person to person... And not everyone’s work schedules and bedtimes are the same.”
As a rule of thumb, though, the recommendation for someone who works a 9 to 5 and follows a standard evening bedtime is to cut off caffeine intake around 2 or 3 p.m.”
If I had caffeine at 2 or 3 p.m., I’d be staring at the ceiling all night. Advising everyone to stop at a particular time, or to stop a specific number of hours before bedtime, isn’t great public health messaging unless individual differences are more strongly emphasized.
In short, concrete advice needs to be viewed cautiously and tailored to your particular needs. Here’s a rule of thumb: The more concrete the advice, the less likely it will be optimal for you. Last call for caffeine needn’t be exactly 8.8 hours before bedtime.
In the Appendix I discuss whether it makes sense to pursue genetic testing in order to better understand your own caffeine metabolism.
2. Anticipate complexities.
Caffeine and sleep are related in complicated ways. For example, caffeine triggers the release of stress hormones such as epinephrine and cortisol. These hormones heighten arousal and may increase anxiety to the point that sleep is impaired. In other words, poorer sleep may result from caffeine blocking adenosine receptors and, separately from that, an increase in anxiety levels.
A study published two weeks ago showed an association between caffeine intake and anxiety starting at around 300-400 mg per day (roughly 3 to 4 typical 8-ounce cups of coffee). Other studies also show a connection, though they disagree on how much caffeine increases the risk of anxiety symptoms.
Here again, the takeaway for you, the individual, is not to limit your caffeine intake to 300-400 mg per day, but to simply be aware that sufficiently high intake can impair sleep by making you more anxious.
I wonder now about Joan. Surely manic episodes kept her up late, but did the caffeine contribute, and if so, was it by warding off sleepiness, fueling her anxiety, or both? I’ll never know. (As the weeks passed her symptoms did abate, and by the time she left the hospital she had stopped hurling objects and insults at me.)
The complexities of caffeine-sleep relationships can be illustrated by more positive scenarios as well. If you’re having trouble sleeping, a slight increase in caffeine intake might lead to better sleep if you’re prompted to be more mentally and physically active during the day. The trick would be to choose the dose and timing that prevents the extra caffeine from being counterproductive. This brings me to my final suggestion.
3. Experiment.
That’s my one-word answer to the question prompting this newsletter.
If you think caffeine is disrupting your sleep, try having your last caffeine earlier than usual. Everyone from Ask a Doctor to ChatGPT and Claude will tell you that.
You might also experiment with dosage. Either have your last caffeine earlier in the day and take less of it at that time, or keep the timing constant while taking less.
If you’re reducing caffeine intake, expect some drowsiness and fatigue at first. Give your body time to adjust – though exactly how much time is hard to say. A number of studies suggest about a week for substantial reductions (e.g., shifting from one or two cups of coffee per day to zero). But you might not have to scale back that much. I find, for instance, that just over half a cup of coffee at 1 p.m. keeps me up too late, while a half a cup or less at that time seems fine.
I plan to cut back a bit more, given the possibility of sleep effects I’m unaware of, but I don’t expect to discover the precise timing and dose of caffeine that gives me the perfect balance of alertness, energy, and high-quality sleep. Personal heath isn’t an exact science.
In the end, what’s most important is to view sleep holistically. If you aren’t sleeping well, you should explore the many possible adversaries: Health problems, sedentariness, long naps, stress, heavy meals at night, drinking too much, noisy sleep environments, screen time in bed, etc. Adjusting your caffeine intake may or may not be part of the solution.
Thanks for reading – and I hope you rest well tonight!
Appendix: Genetic testing?
For roughly $100 to $150, you can purchase a DNA test to determine which variants of CYP1A2 and ADORA2A you have.
I’m strongly opposed to these tests, because they don’t measure caffeine metabolism directly, the alleles they identify don’t account for most of the variance in individual reactions, and in any case genetic information doesn’t translate into concrete guidance for how much caffeine to take and when to stop taking it.
Still, in the interest of fairness, I should acknowledge that someone who’s doing all the right things but still struggling to get a good night’s sleep might benefit from information on their metabolism.
I’m thinking, for instance, of people who have caffeine in the afternoon in order to get through the rest of their day. If they happen to have CYP1A2 variants that promote slow caffeine metabolism, their sleep may be undermined – but their last caffeine of the day may be too far away from bedtime for them to perceive a connection.






NEVER‼️ Just kidding. This is essential information that each person must evaluate for their own body.
While you're actually sleeping.