Caffeine and Sleep: How Late Is Too Late for Coffee?
Caffeine can shorten your sleep even when you don't notice it. Here's what research says about cut-off times, safe daily amounts and cutting back.

That mid-afternoon coffee might feel harmless by bedtime. You may even fall asleep without trouble. But research shows caffeine can quietly shorten and lighten your sleep many hours after your last cup — often without you noticing. Here’s how caffeine affects sleep, how late is too late, and how much is generally considered safe.
Key takeaways
- For most healthy adults, the FDA cites up to 400 mg of caffeine a day (roughly 2–3 cups of brewed coffee, depending on strength) as an amount not generally linked to negative effects.
- In a sleep-lab study, 400 mg of caffeine taken 6 hours before bed reduced total sleep by more than an hour — and participants didn’t notice.
- A 2023 meta-analysis found caffeine reduced total sleep by about 45 minutes and suggested avoiding a typical cup of coffee for at least 8.8 hours before bed.
- Sensitivity varies widely. If you have trouble sleeping, try moving your last caffeine to the morning or early afternoon.
In this article
How caffeine affects sleep
Caffeine is a stimulant. It helps you feel alert partly by blocking adenosine, a chemical that builds up in the brain during waking hours and promotes sleepiness. That’s useful in the morning, but caffeine stays active in your body for hours, so a dose in the afternoon can still be working at bedtime.
A 2023 systematic review and meta-analysis in Sleep Medicine Reviews pooled 24 studies and found that caffeine, on average:
- Reduced total sleep time by about 45 minutes
- Increased the time it took to fall asleep by about 9 minutes
- Increased time awake after falling asleep by about 12 minutes
- Reduced sleep efficiency by about 7%
- Reduced deep sleep and increased light sleep
Less deep sleep matters because it’s the stage most associated with feeling physically restored. Even if you fall asleep easily, caffeine may make your night lighter and more broken.

How late is too late for caffeine?
The 6-hour study
In a frequently cited study published in the Journal of Clinical Sleep Medicine in 2013, researchers gave 12 healthy adults 400 mg of caffeine (or a placebo) at 0, 3 or 6 hours before their usual bedtime. Caffeine taken even 6 hours before bed reduced total sleep time by more than one hour when measured objectively at home. Strikingly, participants’ own sleep diaries didn’t pick up the disruption.
The 2023 meta-analysis
Based on the pooled data, the 2023 review’s authors suggested that, to avoid reductions in total sleep time:
| Caffeine source (as studied) | Suggested cut-off before bedtime | If bedtime is 10:30 p.m., stop by about… |
|---|---|---|
| Standard cup of coffee (about 107 mg per 250 mL) | At least 8.8 hours | 1:40 p.m. |
| Typical pre-workout supplement serving (about 217.5 mg) | At least 13.2 hours | 9:20 a.m. |
Source: Gardiner C, et al. Sleep Medicine Reviews, 2023. The authors present these as starting points to adjust based on individual response.
Bigger doses need a longer runway. And because people metabolize caffeine at very different rates — the FDA notes that sensitivity varies widely — your personal cut-off might be earlier or later.
How much caffeine is in common drinks?
The FDA gives these ranges for 12-fluid-ounce servings:
| Drink (12 fl oz) | Caffeine |
|---|---|
| Brewed coffee | 113–247 mg |
| Energy drink | 41–246 mg |
| Black tea | 71 mg |
| Green tea | 37 mg |
| Caffeinated soft drink | 23–83 mg |
Source: U.S. Food and Drug Administration. Coffee-shop serving sizes are often larger than 12 oz.
Don’t forget less obvious sources such as cold brew, espresso drinks, pre-workout powders, some pain relievers and chocolate.
How much caffeine is too much?
For healthy adults, the FDA cites 400 mg a day as an amount not generally associated with dangerous, negative effects. Signs you may be having too much include:
- Insomnia or disrupted sleep
- Jitters, anxiety or restlessness
- Fast heart rate or palpitations
- Upset stomach or nausea
- Headache
Who should be more careful
If you’re pregnant, trying to become pregnant or breastfeeding, the FDA recommends talking with your healthcare provider about caffeine. People with heart rhythm problems, anxiety disorders, high blood pressure, or who take certain medications should also ask their clinician. The FDA warns that pure and highly concentrated caffeine products can be dangerous: about 1,200 mg consumed quickly can cause toxic effects such as seizures.

How to cut back on caffeine without the headache
- Set a cut-off time. Start with no caffeine after early afternoon, then adjust based on how you sleep.
- Taper gradually. Cutting back suddenly can cause headaches and fatigue. Reduce by about a half-cup at a time over a week or two.
- Switch to half-caf or decaf for afternoon cups. Decaf still contains a small amount of caffeine.
- Choose lower-caffeine teas later in the day, or caffeine-free herbal options.
- Hydrate. Sometimes afternoon fatigue is partly thirst — see how much water you should drink.
- Tackle the cause of tiredness. If you need caffeine to function every afternoon, you may simply need more sleep. Our guide to how much sleep adults need can help.
Try a 2-week experiment
Move your last caffeinated drink to before noon for two weeks and note how quickly you fall asleep, how often you wake, and how rested you feel. It’s a simple way to find your personal threshold.
Frequently asked questions
Does decaf coffee contain caffeine?
Yes, a small amount. Decaf has far less caffeine than regular coffee but not zero, so very sensitive people may still notice an effect from several cups.
Why can some people drink espresso at night and still sleep?
People differ a lot in how sensitive they are to caffeine, as the FDA notes. But feeling fine isn’t proof that sleep is unaffected: in the 2013 sleep study, caffeine reduced measured sleep by more than an hour while participants didn’t report the difference.
Is coffee dehydrating?
Not for regular coffee drinkers in typical amounts. Mayo Clinic says coffee and tea count toward your daily fluid intake. The bigger concerns are caffeine timing for sleep and added sugar in sweetened coffee drinks.
Are energy drinks worse than coffee for sleep?
It depends on the dose. The FDA lists 41–246 mg of caffeine in a 12-ounce energy drink, so some contain more than a cup of coffee. Larger doses need a longer gap before bedtime. The CDC also notes that energy drinks can contain other stimulants.
The bottom line
Caffeine can cut your sleep short even when you don’t feel it. Research suggests stopping a regular cup of coffee at least 8–9 hours before bed, and earlier for larger doses. Keep total intake within about 400 mg a day if you’re a healthy adult, and talk to your clinician if you’re pregnant or have a heart or anxiety condition. If you still have trouble sleeping after adjusting your caffeine, other habits — like a calming bedtime routine with slow breathing — may help.
Sources
- U.S. Food and Drug Administration. Spilling the Beans: How Much Caffeine is Too Much?
- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine. 2013;9(11):1195–1200. Summary: American Academy of Sleep Medicine.
- Gardiner C, Weakley J, Burke LM, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews. 2023;69:101764.
- Centers for Disease Control and Prevention. About Water and Healthier Drinks.