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

URL: https://vitalzone.net/caffeine-and-sleep/
Author: Rayen Calder
Published: 2026-11-17 | Updated: 2026-11-17

Can an afternoon coffee really ruin your night? For many people, yes. Research on **caffeine and sleep** shows that caffeine can shorten and lighten sleep even when you drink it 6 hours before bed, often without you noticing.

A 2023 meta-analysis put a number on it: to protect total sleep time, a regular cup of coffee should come at least **8.8 hours** before bedtime. For a 10:30 p.m. bedtime, that’s about 1:45 p.m.

Short answer

- **Caffeine cut sleep by about 45 minutes** on average across 24 studies, and reduced deep sleep.

- **Timing matters:** 400 mg taken 6 hours before bed still disrupted sleep in a controlled trial.

- **Rule of thumb:** last coffee about 9 hours before bed; a typical pre-workout drink, about 13 hours.

- **Sensitivity varies.** Older adults and people with certain gene variants tend to be more affected.

- **Daily limit:** the FDA cites 400 mg a day for most healthy adults; less if you’re pregnant.

## How caffeine keeps you awake

Throughout the day, a chemical called adenosine builds up in your brain. The more of it there is, the sleepier you feel. Caffeine [blocks adenosine receptors](https://doi.org/10.1016/j.smrv.2016.01.006), so the “sleep pressure” signal doesn’t get through.

The problem is that caffeine doesn’t clock out when you do. It lingers for hours. So the 3 p.m. latte can still be blocking that signal at 11 p.m.

_For a 10:30pm bedtime, the meta-analysis cut-off puts your last regular coffee around 1:45pm._

## What the research shows

### Caffeine cuts sleep time and deep sleep

A [2023 systematic review and meta-analysis in *Sleep Medicine Reviews*](https://doi.org/10.1016/j.smrv.2023.101764) pooled 24 studies. On average, caffeine:

- reduced total sleep time by **45 minutes**

- lowered sleep efficiency by **7%**

- added about **9 minutes** to the time it took to fall asleep

- added about **12 minutes** of time awake during the night

- shifted sleep toward lighter stages, with about **11 minutes less deep sleep**

That last point matters. You might fall asleep fine and still wake up less rested.

### Even 6 hours before bed isn’t safe for everyone

In a [randomized, placebo-controlled trial from Henry Ford Hospital](https://doi.org/10.5664/jcsm.3170), adults took 400 mg of caffeine (roughly 2–4 cups of coffee, depending on the brew) at bedtime, 3 hours before, or 6 hours before. All three timings disrupted sleep compared with placebo. The authors concluded people should avoid substantial caffeine for at least 6 hours before bed.

This was a high dose taken all at once, so a single small coffee may affect you less. Still, the 6-hour window is a floor, not a target.

### So how late is too late?

The 2023 meta-analysis estimated cut-off times to avoid losing sleep:

| | Drink | Caffeine used in the analysis | Stop at least  |
| Coffee | 107 mg per 250 mL (about 8.5 oz) | **8.8 hours** before bed  |
| Pre-workout supplement | 217.5 mg per serving | **13.2 hours** before bed  |

Tea, cola and dark chocolate contain less caffeine than coffee, but they add up. Energy drinks and some pre-workouts can contain a lot more. Check the label.

## Why some people can drink espresso at night

You probably know someone who claims coffee never affects them. They may be partly right.

A [systematic review in *Sleep Medicine Reviews*](https://doi.org/10.1016/j.smrv.2016.01.006) found clear dose and timing effects across studies, but also pronounced individual differences. Genetic variants in how people process caffeine and respond to adenosine influence how much it disrupts sleep. **Older adults** also appear more sensitive than younger ones.

Two caveats. Many studies were done in young Western men, so results may not apply to everyone. And people who think caffeine doesn’t affect them can still lose deep sleep without noticing.

## How to cut back without crashing

- **Set a cut-off time.** Count back about 9 hours from your usual bedtime and make that your last coffee.

- **Front-load it.** Have your caffeine in the morning, when it helps most.

- **Taper, don’t quit cold.** If you drink a lot, cut down gradually over a week or two. Stopping suddenly can bring headaches and tiredness for a few days.

- **Switch the afternoon drink.** Try decaf, half-caf or an herbal tea like [chamomile](https://vitalzone.net/chamomile-tea-for-sleep/).

- **Watch hidden sources:** pre-workouts, energy drinks, cola, some pain relievers and dark chocolate.

- **Don’t use caffeine to cover bad sleep.** It masks tiredness, which can push you into a cycle of poor sleep and more coffee.

Caffeine is only one piece. Our [sleep hygiene checklist](https://vitalzone.net/sleep-hygiene-tips/) covers the rest, and [how to sleep better naturally](https://vitalzone.net/how-to-sleep-better/) is the full guide.

**My take:** if you sleep poorly and drink coffee after lunch, a 2-week experiment is the cheapest thing you can try. Move your last cup to before noon and keep everything else the same. The trial data suggests you may sleep longer and more deeply even if you don’t notice falling asleep any faster.

## The gut-brain angle

Coffee does more than wake up your brain. In a [study in *Gut*](https://doi.org/10.1136/gut.31.4.450), 29% of healthy young volunteers said coffee gave them an urge to have a bowel movement. In the responders, both regular and decaf coffee boosted activity in the lower colon within 4 minutes. Since decaf had the same effect, something other than caffeine seems to be involved.

That’s useful if you’re constipated, but less so if you have IBS with diarrhea. Caffeine can also feel jittery and anxious for some people, and anxiety itself affects the gut. If coffee seems to set off your stomach or nerves, read [nervous stomach](https://vitalzone.net/nervous-stomach/) and [gut health and anxiety](https://vitalzone.net/gut-health-and-anxiety/).

Poor sleep and gut health also feed into each other. See [can your gut microbiome affect your sleep?](https://vitalzone.net/gut-microbiome-and-sleep/)

## The evidence at a glance

| | Claim | Evidence strength | What it is based on  |
| Caffeine reduces total sleep time and deep sleep | **Strong** | Meta-analysis of 24 studies  |
| Caffeine 6 hours before bed can still disrupt sleep | **Moderate** | One randomized, placebo-controlled trial (400 mg)  |
| Coffee should stop about 9 hours before bed | **Moderate** | Meta-analysis estimate; individual needs vary  |
| Some people are more sensitive to caffeine than others | **Moderate** | Systematic review including genetic studies  |
| Coffee stimulates the colon in some people | **Limited** | Small physiology study  |

## Who should be careful

- **Pregnancy:** the [American College of Obstetricians and Gynecologists](https://pubmed.ncbi.nlm.nih.gov/20664420/) advises keeping caffeine under 200 mg a day. Check with your doctor or midwife.

- **Daily limit:** the [FDA](https://www.fda.gov/consumers/consumer-updates/spilling-beans-how-much-caffeine-too-much) cites 400 mg a day as an amount not generally linked to dangerous effects in healthy adults. That doesn’t make 400 mg right for your sleep.

- **Heart rhythm problems, high blood pressure, anxiety disorders, reflux or IBS:** caffeine can worsen symptoms. Ask your doctor what’s safe for you.

- **Medications:** some drugs interact with caffeine or slow how fast your body clears it. Ask your pharmacist.

- **Children and teens:** the FDA has not set a safe level for kids, and energy drinks are best avoided.

- **Ongoing insomnia:** if you still sleep poorly after cutting caffeine for a few weeks, talk to a doctor. Snoring, gasping at night or heavy daytime sleepiness can signal sleep apnea.

This guide is for general information and is not medical advice. Read our [medical disclaimer](https://vitalzone.net/medical-disclaimer/).

## FAQ

### How long before bed should you stop drinking caffeine?

A 2023 meta-analysis estimated at least 8.8 hours for a regular coffee and about 13 hours for a typical pre-workout supplement. A controlled trial found 400 mg still disrupted sleep when taken 6 hours before bed.

### Does caffeine affect sleep quality even if I fall asleep easily?

It can. Across studies, caffeine reduced deep sleep and increased time awake during the night, which can leave you less rested even if falling asleep feels normal.

### Why doesn’t caffeine affect some people’s sleep?

Genetics, age and habits all play a role. Some people process caffeine faster or respond less to it. Older adults tend to be more sensitive.

### Will quitting caffeine improve my sleep?

If you drink caffeine in the afternoon or evening, moving it earlier or cutting back may help you sleep longer and more deeply. Taper slowly to avoid headaches and fatigue.

### Is decaf okay before bed?

Decaf contains a small amount of caffeine, much less than regular coffee. Most people tolerate it in the evening, but very sensitive people may want to stop earlier.

## Share your experience

Have you tried moving your last coffee earlier or cutting caffeine altogether? Did your sleep change, or not at all? Are you still trying to find your cut-off time? Share what you noticed in the comments below.

Comments are moderated. Please don’t share personal medical details, and remember that what worked for one person may not suit another.

## Sources

- Gardiner C, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. *Sleep Med Rev*. 2023;69:101764. [doi:10.1016/j.smrv.2023.101764](https://doi.org/10.1016/j.smrv.2023.101764)

- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. *J Clin Sleep Med*. 2013;9(11):1195-1200. [doi:10.5664/jcsm.3170](https://doi.org/10.5664/jcsm.3170)

- Clark I, Landolt HP. Coffee, caffeine, and sleep: a systematic review of epidemiological studies and randomized controlled trials. *Sleep Med Rev*. 2017;31:70-78. [doi:10.1016/j.smrv.2016.01.006](https://doi.org/10.1016/j.smrv.2016.01.006)

- Brown SR, Cann PA, Read NW. Effect of coffee on distal colon function. *Gut*. 1990;31(4):450-453. [doi:10.1136/gut.31.4.450](https://doi.org/10.1136/gut.31.4.450)

- ACOG Committee Opinion No. 462: Moderate caffeine consumption during pregnancy. *Obstet Gynecol*. 2010;116(2):467-468. [doi:10.1097/AOG.0b013e3181eeb2a1](https://doi.org/10.1097/AOG.0b013e3181eeb2a1)

- U.S. Food and Drug Administration. [Spilling the Beans: How Much Caffeine Is Too Much?](https://www.fda.gov/consumers/consumer-updates/spilling-beans-how-much-caffeine-too-much)
