The short explanation
It can. Caffeine, found in coffee, tea, cola and energy drinks, blocks a chemical in the brain that builds up during the day and makes you sleepy. Its effects can last many hours after the cup, so evening coffee can make it harder to fall asleep and make sleep lighter, even if you do not feel wired. People differ a lot in how sensitive they are. Some can drink coffee late and sleep well; others are affected by a mid-afternoon cup. If you have trouble sleeping, try having your last coffee or tea earlier in the day, for example before lunch, and see if your sleep improves over a few weeks.
What depends on your situation
The parts of this that change from woman to woman. Uncertainty is stated, not hidden.
- Strong filter coffee often contains more caffeine than many people realise.
- Some medicines, pregnancy and liver conditions can make caffeine last longer in the body.
- Stopping caffeine suddenly can cause headaches and irritability for a few days; reducing gradually may be easier.
What this answer cannot determine
The boundary of online education. These need a clinician who can see you.
- This cannot tell you whether caffeine is the main reason for your sleep problems. If cutting back does not help, other causes should be considered.
Questions for your clinician
Take these with you. You can add any of them to an appointment card.
- Could caffeine be affecting my sleep?
- Is it okay to have coffee if I am pregnant or have palpitations?
- What else could be keeping me awake?
- Would a sleep diary help?
When to seek help
Clinician-approved guidance for this topic. When in doubt, being seen is never the wrong choice.
Book an appointment soon
- See a doctor within a few days if you have palpitations or chest discomfort with caffeine.
Raise it at a routine appointment
- Book a routine appointment if poor sleep continues after reducing caffeine.
Sources
The evidence this explanation is built on.
- Insomnia NHS
- Insomnia MedlinePlus (US National Library of Medicine)
- Sleep disorders MedlinePlus (NIH)
Who wrote and reviewed this
Every AskHer answer names its author. A clinically reviewed answer also names the clinician who signed it off — if no clinician is named below, it has not been clinically reviewed.
- Author
- AskHer Editorial (AI-assisted draft) AskHer's editorial team — not an individual clinician Works in English, தமிழ், हिन्दी
- Clinical reviewer
- Nobody yet No clinician has signed this answer off, and no person on the editorial team has read it yet. That is what the “Written with AI assistance” label means. It is queued for an editor to read, and then for a clinician who works in this area. The sources it was drafted against are listed above.
- Review status
- Written with AI assistance — not yet reviewed by a person
- Last reviewed
- Not yet reviewed by a person
- Version
- 1
Correction history
Substantive changes are listed, not quietly edited away.
No corrections have been made since this answer was first published.
Did this answer your question?
Whatever you choose is filed against this version of the answer, never against you, and it is never shown as a count.
“Explain more simply” asks you which part was hard to follow, so the author knows what to rewrite. “My question is different” opens a private follow-up with this answer attached.
Saving, following up and reporting are all private. Nothing you do on this page is visible to other readers or to the doctor who wrote it, unless you ask a question.

