Caffeine and Sleep: How Late Is Too Late for Coffee?

Caffeine and sleep research points to an earlier coffee cutoff than expected.

Vintage alarm clock resting on coffee beans beside a grinder and cup, a reminder that caffeine and sleep timing go together
Photo by RuslanSikunov.

CAFFEINE AND SLEEP · RECOVERY AND HABITS

You may fall asleep easily after an afternoon latte and assume it is doing your sleep no harm. The research suggests the effect may be larger, and quieter, than it feels.

Sleep is when your body does much of its repair work after training, and caffeine is one of the most common reasons that sleep comes up short. This guide looks at what studies show about caffeine and sleep, how to work out a sensible daily cutoff for your own bedtime, how pre-workout drinks and evening training fit in, and how to cut back without a week of headaches. None of it requires giving up coffee. It is mostly a question of timing.

How Caffeine Affects Your Sleep

Caffeine is a stimulant, and its effects do not switch off when the cup is empty. The FDA notes that people vary widely both in how sensitive they are to caffeine and in how quickly their bodies clear it. That is why one person can sleep soundly after an espresso with dinner while another lies awake after a midday cup.

The Mayo Clinic points out that using caffeine to make up for poor sleep can create a cycle. Caffeine disrupts sleep at night, which leaves you more tired the next day, which sends you back for more caffeine. Small amounts of lost sleep add up, and many people never connect a restless night with a drink they had hours earlier.

What the Research Says About Timing

A frequently cited study led by Christopher Drake and published in the Journal of Clinical Sleep Medicine in 2013 gave 12 healthy sleepers 400 milligrams of caffeine, about two to three cups of coffee, at bedtime, three hours before bed or six hours before. Even taken six hours before bed, caffeine cut objectively measured total sleep time by more than an hour. Strikingly, the participants’ own sleep diaries suggested they were unaware of the disruption. In announcing the findings, the American Academy of Sleep Medicine reported the authors’ suggestion that caffeine generally be avoided after 5 p.m.

A larger 2023 systematic review and meta-analysis by Gardiner and colleagues in Sleep Medicine Reviews, summarized by AJMC, pooled 24 studies. Caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7 percent. It added about 9 minutes to the time it took to fall asleep and about 12 minutes of wakefulness during the night, and it shortened deep sleep by roughly 11 minutes while adding light sleep.

The authors also estimated how far ahead of bedtime caffeine should be consumed to avoid reducing total sleep. For a standard cup of coffee containing about 107 milligrams, the answer was at least 8.8 hours. For a typical pre-workout supplement serving of 217.5 milligrams, it stretched to at least 13.2 hours.

Finding Your Coffee Cutoff

Those estimates translate into an earlier last cup than many people expect. Work backward from the time you usually go to bed.

Usual bedtimeLast regular coffee (8.8 hours before)Last pre-workout drink (13.2 hours before)
9:30 p.m.12:42 p.m.8:18 a.m.
10:00 p.m.1:12 p.m.8:48 a.m.
10:30 p.m.1:42 p.m.9:18 a.m.
11:00 p.m.2:12 p.m.9:48 a.m.

Treat these times as starting points rather than strict rules. Because sensitivity varies so much, you may sleep well with an early-afternoon cup and not need to change anything. If you lie awake, wake often or feel unrefreshed, try moving your last caffeinated drink earlier by an hour or two for a couple of weeks and see whether your sleep improves. Remember that tea, cola and energy drinks also count, and Mayo notes that some energy bars, packaged foods and over-the-counter pain relievers contain caffeine too.

If an afternoon slump is what sends you to the coffee pot, try a different pick-me-up first. A brisk 10-minute walk outside, a glass of water or a small snack can often take the edge off without adding caffeine to your evening. On days when you are truly short on sleep, a brief early-afternoon nap may serve you better than another cup, and our guide to napping for recovery explains how to keep a nap from cutting into your night.

Caffeine, Workouts and Evening Training

Plenty of people use caffeine before exercise, and our look at whether to drink coffee before a workout covers what it can and cannot do for performance. The sleep research adds a timing caution. A pre-workout drink before an evening session puts a sizable dose into your system right when you need to be winding down. If you train after work, consider a decaf or caffeine-free option, or save caffeinated sessions for the morning.

Hard training already asks a lot of your recovery, and our guide to sleep and muscle recovery explains why the hours you sleep matter for getting stronger. The American Academy of Sleep Medicine recommends that adults get at least seven hours a night, yet a CDC data brief reported by NPR in May 2026 found that 30.5 percent of US adults surveyed in 2024 were getting less than the recommended amount.

How Much Caffeine Is Too Much?

For healthy adults, the FDA has cited 400 milligrams a day, roughly two to three 12-ounce cups of coffee, as an amount not generally associated with negative effects. Caffeine content varies widely between drinks and brands, though, and some people react strongly even to small amounts. Daily total and timing are separate questions: you can stay well under the limit and still lose sleep from a late cup.

Signs you may be overdoing it include insomnia, jitters, anxiety, a racing heart or palpitations, an upset stomach, nausea and headache. Certain health conditions and some medications can make you more sensitive to caffeine, so ask your doctor or pharmacist if you take regular medication, have a health condition, or are pregnant or breastfeeding. The FDA also warns that pure and highly concentrated caffeine products can have serious health consequences.

Cutting Back Without the Headache

If you decide to move your cutoff or reduce your daily total, go gradually. Caffeine withdrawal is not considered dangerous, but it can be unpleasant, bringing headaches, tiredness, irritability and trouble focusing that are usually mild and short-lived. These steps from the Mayo Clinic make the change easier:

  • Trim in small steps, such as a smaller afternoon cup or one less soda a day.
  • Switch your later cups to decaf, which often tastes the same but still contains a little caffeine.
  • Brew tea for a shorter time, or move to caffeine-free herbal tea after lunch.
  • Check labels on energy bars, packaged foods and pain relievers before you reach for them late in the day.

Pair the change with other habits that support good sleep, such as getting morning light to anchor your body clock, staying active during the day and giving yourself a consistent wind-down routine in the evening.

TWO-WEEK EXPERIMENT

Test Your Own Caffeine Cutoff

  • Write down your usual bedtime and the time of your last caffeinated drink this week.
  • For the next two weeks, finish your last regular coffee at least 8.8 hours before bed.
  • Each morning, rate your sleep from 1 to 5 and note any night waking.
  • Compare the two weeks with the week before, then keep the cutoff that leaves you feeling best.

This article is for general information and is not a substitute for personal medical advice.

Are you a fitness or wellness professional with a member journey to share?

Share This Article