Caffeine, Alcohol and Sleep: How to Enjoy Both Without Wrecking Your Night
What caffeine and alcohol actually do to sleep, how to time them, and simple swaps that let you keep your coffee and the occasional drink.

Coffee in the morning and a glass of wine in the evening are part of daily life for many people. Both can affect sleep, but that doesn’t mean you have to give them up. Understanding how they work makes it much easier to enjoy them in a way that doesn’t cost you a good night’s rest.

Good Sleep cooling and heating mattress topper
A water-based mattress topper that cools to 62°F and heats to 110°F and fits on top of the mattress you already have. Simple touch-panel control with no app, Wi-Fi or subscription. Dual zone on King.
Shop nowWho this guide is for
This guide is for anyone who enjoys coffee, tea or the occasional drink and suspects it might be affecting their nights. You might fall asleep easily but wake at 3 a.m., feel groggy despite enough hours in bed, or rely on an afternoon coffee to get through the day. It isn’t about cutting anything out completely. It’s about understanding how these drinks work so you can time them better. If you’re pregnant, take regular medicines or have a health condition, check with your doctor or pharmacist about caffeine and alcohol, because the advice may be different for you.
How caffeine affects sleep
While you’re awake, a chemical called adenosine gradually builds up in your brain. The more of it there is, the more sleep pressure you feel. Caffeine works mainly by blocking adenosine receptors, so you feel less tired even though the underlying sleep pressure is still there.
That’s helpful at 8 a.m. It’s less helpful at 10 p.m. Caffeine can stay active in the body for many hours. Studies have found that caffeine taken even several hours before bed can reduce total sleep time for some people, and caffeine can make sleep lighter even when you don’t notice any trouble falling asleep.
People vary a lot. Genetics, age, pregnancy, some medicines and how regularly you drink caffeine all affect how quickly it clears. Some people can drink an espresso after dinner and sleep fine; others feel the effects of a lunchtime coffee at midnight.
Setting your caffeine cut-off
A common starting point is to have your last caffeine by early afternoon, which leaves a long gap before a typical bedtime. Then experiment:
- Pick a cut-off time and stick to it for two weeks.
- Note how quickly you fall asleep and how rested you feel.
- If sleep improves, keep it. If it doesn’t change, the timing may not be your main issue. If you still struggle, try moving the cut-off earlier.
If you drink a lot of caffeine, cutting back suddenly can cause headaches and tiredness for a few days. Reducing gradually, for example by swapping one cup at a time for decaf, is usually more comfortable.
Hidden sources of caffeine

Coffee is the obvious one, but caffeine turns up elsewhere:
- Tea, including black and green tea. Most herbal teas are caffeine-free.
- Cola and many other soft drinks.
- Energy drinks and pre-workout supplements, which can contain large amounts.
- Chocolate, especially dark chocolate, in smaller amounts.
- Some pain relievers and cold remedies. Check the label.
- Decaf coffee, which contains a small amount of caffeine, though much less than regular.
If you’re sensitive, an afternoon cup of tea or a chocolate dessert can make a difference.
How alcohol affects sleep
Alcohol has a different and more misleading effect. It’s a sedative, so many people find a drink helps them fall asleep faster. But as the body processes alcohol through the night, sleep tends to become lighter and more fragmented. Research has linked alcohol before bed with changes to sleep architecture, including less REM sleep earlier in the night, and with more awakenings in the second half.
Alcohol can also:
- Relax the muscles of the throat, which can make snoring and sleep apnea worse.
- Increase trips to the bathroom.
- Leave you feeling hot or sweaty during the night.
- Contribute to dehydration and a groggy morning.
The more you drink and the closer to bedtime, the bigger these effects tend to be.
Timing alcohol for better sleep
You don’t have to give up the occasional drink to sleep well. Some practical steps:
- Leave a gap. Finishing your last drink a few hours before bed gives your body time to process some of it.
- Alternate with water. It helps you pace yourself and stay hydrated.
- Eat with it. Drinking with food slows absorption.
- Keep the amount moderate. Smaller amounts have smaller effects on sleep.
- Don’t use alcohol as a sleep aid. It may get you to sleep, but it tends to cost you sleep quality later in the night.
If you regularly rely on alcohol to fall asleep, or you find it hard to cut back, it’s worth talking to a doctor.
Nicotine and other stimulants
Nicotine is a stimulant too, and people who smoke or vape may experience lighter sleep and wake during the night as nicotine levels drop. Stopping is one of the best things you can do for your health in general, and support from a doctor or a quit service makes success more likely.
Some decongestants, weight loss products and medicines can also affect sleep. If you’ve started a new medicine and your sleep has changed, ask your pharmacist or doctor.
Better evening swaps

If you like a warm drink or a ritual in the evening, try:
- Herbal teas such as chamomile, rooibos or peppermint, which are naturally caffeine-free.
- Warm milk or a milk alternative, if it agrees with you.
- Decaf coffee earlier in the evening, if you love the taste.
- Alcohol-free beers, wines and mocktails, which have improved a lot in recent years.
- Sparkling water with fruit as a “something special” drink without the downsides.
Keep the amount of any drink modest close to bed to avoid waking up for the bathroom. See eating and drinking before bed.
A simple timing guide
| Drink | Suggested approach | Why |
|---|---|---|
| Coffee, tea, cola, energy drinks | Last one by early afternoon to start | Caffeine can stay active for many hours |
| Decaf coffee | Fine for most people in the evening | Contains only a small amount of caffeine |
| Alcohol | Moderate amounts, finished a few hours before bed | Tends to fragment sleep later in the night |
| Herbal tea | A small cup during your wind-down | Caffeine-free and calming as a ritual |
| Water | Steady through the day, less right before bed | Avoids night-time bathroom trips |
Common mistakes
Using caffeine to cover up short sleep. It works for a while, but more caffeine later in the day can make the next night’s sleep worse, creating a cycle. Fixing sleep first often means needing less caffeine.
Assuming you’re immune. Even if you fall asleep fine after coffee, caffeine may still make your sleep lighter.
The “nightcap”. A drink right before bed is one of the most common habits that quietly makes sleep worse.
Ignoring energy drinks. Some contain far more caffeine than a cup of coffee.
For the full picture, see our main guide on how to get good sleep and our sleep hygiene checklist.
A two-week experiment
The best way to learn how caffeine and alcohol affect your own sleep is to test it.
Week 1: Caffeine. Set a firm caffeine cut-off, such as 1 p.m., and keep your alcohol habits the same. Each morning, note roughly how long it took to fall asleep, whether you woke during the night and how rested you feel.
Week 2: Alcohol. Keep the caffeine cut-off and add an alcohol rule, such as no drinks on weeknights, or finishing any drink at least three hours before bed. Keep noting how you sleep.
At the end, compare your notes with how you normally feel. Many people are surprised by how much difference one of the two changes makes. If you see no change at all, these may not be the main factors for you, and you can focus on other habits in our sleep hygiene checklist.
Key takeaways
- Caffeine blocks the chemical that makes you feel sleepy and can stay active for many hours.
- An early afternoon cut-off is a sensible starting point; sensitive people may need an earlier one.
- Alcohol can help you fall asleep but tends to disturb sleep later in the night.
- Leave a gap of a few hours between your last drink and bedtime.
- Herbal teas and alcohol-free drinks make good evening swaps.
Related guides
If you found this useful, these guides go deeper on closely related topics:
- Exercise and Sleep: How Moving More Can Help You Rest Better: how regular movement supports better rest, and when to work out.
- The Smart Napping Guide: When Naps Help and When They Hurt: how long to nap, when, and when naps work against you.
- Eating and Drinking Before Bed: What Helps, What Hurts: meal timing, snacks and evening drinks.
- How to Get Good Sleep: A Practical, No-Hype Guide: our main guide to getting good sleep, with the habits that matter most and the order to try them.
Each one sticks to the same approach as this article: practical steps, plain language and no miracle cures. Pick the one that matches the part of your sleep you most want to improve, try one change at a time and give it a couple of weeks.
A cool, comfortable bed helps you stay asleep through the second half of the night. If heat still wakes you, the Good Sleep System is a water-based topper that cools to 62°F and heats to 110°F, with no app or subscription.
Frequently asked questions
When should I stop drinking coffee?
Early afternoon is a common starting point. If you’re sensitive to caffeine, you may need an earlier cut-off. Experiment for a couple of weeks and see how you sleep.
Does decaf affect sleep?
Decaf contains a small amount of caffeine. Most people can drink it in the evening without problems, but very sensitive people may want to keep it earlier too.
Does alcohol help you sleep?
It can help you fall asleep faster, but it tends to make sleep lighter and more broken later in the night. Overall, sleep quality is usually worse after drinking, especially close to bedtime.
How long before bed should I stop drinking alcohol?
There is no exact rule, but leaving a few hours between your last drink and bedtime, and keeping the amount moderate, reduces the impact.
Is green tea OK in the evening?
Green tea contains caffeine, though usually less than coffee. If you’re sensitive, choose a caffeine-free herbal tea in the evening instead.


