Blog
Does Caffeine Cause Insomnia? How Long Does It Affect Sleep?
Caffeine is part of many people’s daily routines. From morning coffee and afternoon tea to energy drinks and chocolate, it is easy to consume more caffeine than you realise. But can your favourite drink affect your sleep hours later?
Yes, caffeine can cause insomnia and disrupt sleep quality. It works by blocking adenosine, a chemical in the brain that helps you feel sleepy. Caffeine has an average half-life of around five hours, meaning approximately half of the caffeine you consume may still be in your body five hours later.
Even an afternoon coffee can make it harder to fall asleep at night, particularly if you are sensitive to stimulants.
Understanding how caffeine works, how long it stays in your system and when to stop drinking it can help you develop healthier sleeping habits. Relax Tab explores the science behind caffeine and sleep, along with practical ways to protect your nightly rest.
What Is Caffeine and How Does It Affect Sleep?
Caffeine is a natural stimulant found in coffee beans, tea leaves, cocoa and certain other plants. It is also added to energy drinks, soft drinks and some medicines.
Its main effect is to stimulate the central nervous system, helping you feel more alert and less tired.
How does caffeine work in the brain?
Your brain naturally produces a chemical called adenosine. Throughout the day, adenosine builds up and gradually increases your feeling of sleepiness.
Caffeine temporarily blocks adenosine receptors. As a result, your brain receives fewer signals associated with tiredness.
This can help you stay awake, but consuming caffeine too late may interfere with your natural sleep cycle.
Does Caffeine Cause Insomnia?
Yes. Caffeine can trigger or worsen insomnia by making it harder to fall asleep, reducing total sleep time and disrupting normal sleep patterns.
Research published in the Journal of Clinical Sleep Medicine found that caffeine consumed even six hours before bedtime could significantly disturb sleep.
Common signs of caffeine-related sleep disruption include:
- Taking longer than usual to fall asleep.
- Waking up repeatedly during the night.
- Feeling restless when trying to sleep.
- Experiencing lighter or less refreshing sleep.
- Feeling tired the following morning despite spending enough time in bed.
Caffeine does not affect everyone equally. Some people can drink coffee in the afternoon without noticing a difference, while others experience sleep problems after a relatively small amount.
If sleep difficulties continue, read our guide to what insomnia is and its common symptoms.
How Long Does Caffeine Stay in Your System?
Caffeine can remain in your body for several hours after consumption. Its average half-life is approximately five hours, although individual differences can make this period shorter or longer.
For example, if you consume 200mg of caffeine at 2pm, approximately 100mg may remain in your body around 7pm.
How much caffeine remains after consumption?
| Time After Consumption | Approximate Caffeine Remaining |
| Immediately | 200mg |
| After 5 hours | 100mg |
| After 10 hours | 50mg |
| After 15 hours | 25mg |
| After 20 hours | 12.5mg |
These figures are illustrative, based on a five-hour half-life. Actual caffeine elimination varies between individuals.
Importantly, caffeine does not disappear completely when you stop feeling its stimulating effects.
Caffeine Half-Life and Sleep Explained
Caffeine half-life refers to the time your body takes to eliminate approximately half of the caffeine you have consumed.
For most adults, the average is around five hours, but it can vary considerably.
This explains why drinking coffee in the afternoon may still affect your sleep at night.
For example:
- 9am: You drink 200mg of coffee.
- 2pm: Approximately 100mg remains.
- 7pm: Approximately 50mg remains.
- Midnight: Approximately 25mg remains.
Even relatively small amounts may affect people who are particularly sensitive to caffeine.
A 2023 systematic review and meta-analysis published in Sleep Medicine Reviews also found that caffeine consumption can reduce total sleep time and affect sleep quality.
How Many Hours Before Bed Should You Stop Caffeine?
A practical starting point is to stop consuming caffeine at least 8 hours before bedtime. People who experience insomnia or have greater caffeine sensitivity may need an earlier cut-off.
A 2013 sleep study found that caffeine consumed six hours before bedtime could still disrupt sleep.
More recent research suggests that the amount consumed also matters. Larger doses may affect sleep even when taken considerably earlier.
Recommended caffeine cut-off times
| Bedtime | Suggested Last Caffeine |
| 9pm | 1pm |
| 10pm | 2pm |
| 11pm | 3pm |
| Midnight | 4pm |
| 1am | 5pm |
These are practical starting points, not guaranteed safe cut-off times. If you regularly experience sleep difficulties, try avoiding caffeine after lunchtime.

How Much Caffeine Is Too Much Per Day?
According to the US Food and Drug Administration (FDA), up to 400mg of caffeine per day is not generally associated with negative effects for most healthy adults.
However, this is not a recommended target for everyone. Individual sensitivity, medical conditions, pregnancy and certain medicines can change what is appropriate.
Approximate caffeine content in common drinks
| Drink or Food | Approximate Caffeine |
| Brewed coffee (240ml) | 80–100mg |
| Instant coffee (240ml) | 60–80mg |
| Black tea (240ml) | 40–50mg |
| Green tea (240ml) | 20–45mg |
| Cola (330ml) | 30–40mg |
| Energy drink (250ml) | 70–80mg |
| Dark chocolate (30g) | 15–25mg |
Actual amounts vary by brand, serving size and preparation method.
Remember to include caffeine from all sources, rather than counting coffee alone.
Why Can’t I Sleep After Drinking Coffee?
If you cannot sleep after drinking coffee, caffeine may still be stimulating your nervous system when you go to bed.
It blocks adenosine, increases alertness and can make your brain feel active even when your body is physically tired.
Other possible reasons include:
- Drinking coffee too close to bedtime.
- Consuming multiple caffeinated drinks throughout the day.
- Having a naturally higher sensitivity to caffeine.
- Experiencing stress or anxiety.
- Following an inconsistent sleep schedule.
- Using other stimulants.
Anxiety can also make it harder to relax at night. Explore our guide on whether anxiety can affect sleep.
If you regularly feel tired but cannot fall asleep, our article on why you cannot fall asleep at night may help you understand other possible causes.
Factors That Affect Caffeine Sensitivity
Not everyone processes caffeine at the same speed. Several factors can influence how long it remains in your system.
Genetics: Differences in genes involved in caffeine metabolism can make some people process caffeine more slowly.
Age: Caffeine metabolism can change with age.
Pregnancy: Pregnancy can slow caffeine clearance. UK guidance recommends limiting caffeine to no more than 200mg daily during pregnancy.
Medications: Certain medicines can affect caffeine metabolism or increase unwanted stimulant effects. Ask a pharmacist about possible interactions.
Liver function: Changes in liver function can affect how quickly your body processes caffeine.
Smoking: Tobacco smoking can speed up caffeine metabolism. Stopping smoking may therefore change how strongly caffeine affects you.

How to Sleep Better When You Drink Caffeine
You do not necessarily need to give up coffee completely to improve your sleep. Changing your caffeine habits and following a consistent bedtime routine can make a meaningful difference.
Try these practical steps:
1. Move coffee to the morning
Drink coffee earlier in the day rather than relying on afternoon or evening caffeine to maintain energy.
2. Reduce caffeine gradually
If you regularly consume several cups daily, reduce your intake slowly. Suddenly stopping caffeine can cause headaches, tiredness and irritability.
3. Choose caffeine-free alternatives
Consider decaffeinated coffee or caffeine-free herbal tea later in the day. Remember that decaffeinated coffee may still contain small amounts of caffeine.
4. Maintain a consistent sleep schedule
Try going to bed and waking up at similar times every day, including weekends.
5. Reduce screen exposure before bedtime
Bright screens and stimulating content can make it harder to wind down. Put your phone away before bedtime and create a relaxing evening routine.
6. Make your bedroom comfortable
Keep your bedroom dark, quiet and comfortably cool.
For more practical advice, explore our guide to sleep hygiene tips for better rest.
Can Medicines Affect Sleep and Drowsiness?
Yes. Some medicines can cause drowsiness, while others may affect sleep quality or interact with substances that influence the central nervous system.
For example, Klonopin (clonazepam) 2mg is a prescription benzodiazepine medicine used for certain medical conditions. It can cause sedation and dependence and should only be taken under appropriate medical supervision.
Similarly, codeine phosphate 30mg tablets are opioid pain medicines that can cause drowsiness and potentially dangerous breathing problems.
Important: Neither clonazepam nor codeine should be used to counteract caffeine or self-treat caffeine-related insomnia. Combining sedating medicines, particularly benzodiazepines and opioids, can cause life-threatening respiratory depression.
Never change your prescribed medication or combine medicines to improve sleep without speaking to a qualified healthcare professional.
You can explore Relax Tab’s sleeping pills and sleep medication category, but remember that sleep medicines are not suitable for everyone and require appropriate professional guidance.
When Should You Speak to a GP?
Occasional sleep disruption after drinking coffee is not necessarily a sign of a sleep disorder.
However, consider speaking to your GP if:
- You regularly struggle to fall asleep.
- You frequently wake up during the night.
- Daytime tiredness affects your work or daily activities.
- Reducing caffeine does not improve your sleep.
- You experience persistent anxiety or other concerning symptoms.
A healthcare professional can assess potential causes, including insomnia, medication effects, stress and other underlying conditions.
Conclusion
Caffeine can contribute to insomnia, especially when consumed in the afternoon or evening. Although its stimulating effects may wear off within a few hours, caffeine can remain in your system much longer and continue affecting sleep.
The best approach is to monitor your intake, establish an appropriate caffeine cut-off time and develop consistent sleep habits.
You do not necessarily have to stop enjoying coffee. With better timing and moderation, you can enjoy your favourite drinks while giving your body a better opportunity to rest.
At Relax Tab, we encourage informed healthcare decisions and healthier sleep habits. If sleep problems continue despite lifestyle changes, speak to a qualified healthcare professional.
Frequently Asked Questions
A: No. Caffeine does not cause insomnia in everyone. Its effects depend on the amount consumed, timing, individual sensitivity and how quickly the body metabolises it.
A: Yes. Decaffeinated coffee usually contains a small amount of caffeine, although significantly less than regular coffee. People with high caffeine sensitivity may still notice its effects.
A: Yes. Research suggests caffeine can alter sleep architecture, including reducing deep sleep and increasing lighter sleep. The effects depend on caffeine dosage and timing.
A: Yes. Caffeine stimulates the nervous system and may cause nervousness, restlessness, a racing heartbeat or increased anxiety, particularly in sensitive individuals.
A: An eight-hour gap is a useful starting point. However, some people need 10–12 hours or longer, depending on their caffeine sensitivity and the amount consumed.
A: No. Drinking water supports normal hydration but does not significantly speed up caffeine metabolism. Your liver needs time to break down and eliminate caffeine.
A: Caffeinated black and green teas may affect sleep, particularly in sensitive individuals. Choose caffeine-free herbal tea if you want a warm drink before bedtime.
A: Gradually reduce the number of caffeinated drinks you consume each day. Replace some servings with decaffeinated alternatives and allow your body time to adjust.