Sleep

When a Medical Condition Is Driving Your Insomnia

Save

Insomnia rarely arrives from nowhere. Thyroid disease, reflux, restless legs, an enlarged prostate, pain, mood disorders, and certain drugs can all keep you awake or wake you at 3am. This is a plain-language guide to the medical drivers worth ruling out, how a clinician sorts a medical cause from insomnia itself, and why treating one does not always fix the other.

Last updated: July 2026

Talk to a clinician

Gale can help you find a clinician in your state and request a visit.

Find care →

Can a medical condition really cause insomnia?

Yes, and it is common. Insomnia frequently has a medical or psychiatric driver sitting underneath it — a condition that either wakes you physically or keeps your nervous system too activated to let sleep come. About a third of adults report insomnia symptoms, and 9 to 15 percent have insomnia serious enough to affect their days 1. In many of those people, a treatable medical problem is part of what is keeping them awake.

That does not mean the sleeplessness is imaginary, or that it will vanish the moment a lab value is corrected. It means the search for a cause is worth doing carefully, because the right fix depends on what you find.

The relationship also runs both ways. Adults are advised to get at least seven hours of sleep, and regularly getting less is itself linked to higher risk of heart disease, high blood pressure, diabetes, and stroke 3. So a medical problem can rob your sleep, and lost sleep can quietly worsen your health — which is one more reason not to leave chronic insomnia unexamined.

How is a medical cause different from insomnia itself?

The formal definition draws the line. Insomnia is trouble falling asleep, staying asleep, or sleeping restfully despite having the time and opportunity to sleep; when that happens at least three nights a week for more than three months, it is chronic insomnia disorder 2. Older thinking labelled insomnia 'secondary' whenever a medical condition was present, as if it were only a symptom. The current view treats it as comorbid insomnia — a problem that travels alongside the medical one and frequently needs its own treatment.

The practical upshot is that two things can be true at once. You can have an overactive thyroid and an insomnia disorder. Naming both is not double-counting; it is what points a clinician toward treating both.

Which medical conditions most often drive insomnia?

Several conditions show up again and again. Some wake you through discomfort or the need to move or urinate; others rev up the body's stress and alerting systems so sleep stays shallow. The list below is not exhaustive, and more than one can be present at the same time — which is part of why insomnia can be so stubborn.

  • Thyroid disease. An overactive thyroid speeds the heart and metabolism and can leave you wired and unable to settle; an underactive thyroid disturbs sleep in other ways.
  • Acid reflux. Lying flat lets stomach acid rise, and the burning or coughing that follows fragments the night, sometimes without fully waking you.
  • Restless legs syndrome. An uncomfortable urge to move the legs that flares in the evening and at rest, delaying the start of sleep.
  • Nocturia. Repeated waking to urinate — from an enlarged prostate, an overactive bladder, heart or kidney conditions, or simply the timing of fluids — breaks the night into pieces.
  • Chronic pain. Arthritis, back pain, fibromyalgia and headaches both delay sleep and wake you, and short sleep in turn lowers pain tolerance the next day.
  • Heart and lung disease. Breathlessness, a nighttime cough, and obstructive sleep apnea interrupt breathing and sleep.
  • Mood and anxiety. Depression and anxiety are tightly bound to insomnia, each feeding the other.
  • Menopause and hormonal change. Hot flashes and night sweats are a common, specific reason sleep breaks up.
  • Medicines and substances. Some blood-pressure drugs, steroids, stimulants, decongestants, thyroid replacement, alcohol, caffeine and nicotine can all disturb sleep.

Why does the insomnia sometimes stay after the condition is treated?

Because insomnia can become self-sustaining. A medical illness may be the precipitating event, but weeks of broken nights breed new habits and worries — watching the clock, dreading the bed, sleeping in to catch up — that keep the problem running long after the original trigger fades. Sleep researchers describe this with the 3P model: predisposing traits, a precipitating event, and the perpetuating factors that follow. Once the perpetuating factors take over, the insomnia is its own disorder and needs treating in its own right.

This is why balancing the thyroid or calming the reflux helps but does not always deliver a good night. The spark that started the fire is not always the thing keeping it burning.

What does an evaluation look like?

A clinician usually begins with a careful history: when in the night the trouble strikes, what wakes you, which medicines and substances you use, and how the days feel afterward. Blood tests can check the thyroid; questions about snoring and witnessed pauses in breathing may point toward testing for apnea; a two-week symptom diary sharpens the whole picture. This kind of structured evaluation is standard first-line practice 4.

A sleep study is not routine for insomnia. It is reserved for when the story suggests another sleep disorder underneath — obstructive sleep apnea or periodic limb movements, for instance — rather than insomnia on its own. A brief questionnaire such as the insomnia severity index can be repeated over weeks to track whether things are moving in the right direction.

Short-term versus chronic: why the timeline matters

The line between acute vs chronic insomnia is drawn at about three months. Short-term insomnia after a stressor, an illness, or a hospital stay is extremely common and usually settles on its own. It becomes chronic — and more likely to be self-sustaining — once it persists at least three nights a week for more than three months 2. A medical cause can sit behind either, but the longer the insomnia runs, the more it needs treating as a condition in its own right, not just a symptom to wait out.

What helps while you sort out the cause?

Treating the underlying condition is the first move, but it is rarely the only one. For insomnia that has become chronic, cognitive behavioral therapy for insomnia — CBT-I — is the recommended first-line treatment, and a graded review of the evidence finds its behavioral parts, from stimulus control to sleep restriction to relaxation, reliably improve sleep 5. It works even when a medical condition is also present, which is exactly the situation this page describes 2.

Medication has a role for some people, and is a conversation to have with a prescribing clinician, weighed alongside CBT-I rather than instead of it. This page names no drug and no dose on purpose: the right choice, if any, depends on your other conditions and everything else you take.

Common questions

An overactive thyroid is a well-recognized cause of trouble sleeping — it can speed the heart and leave you feeling wired at night. An underactive thyroid can disturb sleep too. A simple blood test can check thyroid function, which is one reason a clinician may order labs when new insomnia does not have an obvious explanation.

Usually not. A sleep study is aimed at disorders like sleep apnea or periodic limb movements, not at insomnia itself. It becomes worth doing when the history points that way — loud snoring, witnessed pauses in breathing, kicking movements, or heavy daytime sleepiness. For most insomnia, a careful history and a sleep diary tell a clinician more than an overnight recording would.

Sometimes, and it is always worth treating the underlying condition. But insomnia can outlast the thing that started it. Once broken sleep has trained new habits and worries around the bed, those can keep it going on their own. If good sleep does not return within a few weeks of treating the cause, the insomnia may need its own treatment.

Yes. Some blood-pressure drugs, steroids, stimulants, decongestants, thyroid replacement, and even the caffeine, nicotine and alcohol many people use to cope can all disturb sleep. Timing matters as much as the drug. It is worth reviewing everything you take — prescription, over-the-counter, and supplements — with a clinician or pharmacist before assuming the insomnia has no fixable cause.

Very possible, and stress-related insomnia is real, not imagined. Insomnia can also become a self-running disorder with no active medical cause at all. That does not make it less treatable — cognitive behavioral therapy for insomnia works whether or not a medical problem is found, which is why an evaluation looks for causes without assuming there must be one.

Related

Say it back

How would you explain this to someone you love?

Two or three sentences, just as you’d say it. Gale reflects back what you focused on — a mirror, not a quiz.

If things feel heavy, a person is available anytime — call or text 988.

Talk to a clinician

Gale can help you find a clinician in your state and request a visit.

Find care →

When insomnia needs a closer look

  • Loud snoring with gasping or witnessed pauses in breathing, especially with heavy daytime sleepiness — a pattern that points to sleep apnea rather than insomnia
  • Falling asleep unintentionally while driving, at work, or mid-conversation
  • New insomnia alongside unexplained weight loss, a racing or irregular heartbeat, drenching night sweats, or chest pain
  • Sleeplessness with persistent low mood, hopelessness, or thoughts that you would be better off not here

If you are having thoughts of harming yourself, call or text 988 (the Suicide and Crisis Lifeline) any time. Chest pain, fainting, or trouble breathing at night is a 911 or emergency-room matter.

This article is for education and does not replace a medical evaluation. Insomnia can have several causes at once; a clinician who knows your full history can order the right tests and weigh treatment options with you.

References

  1. 1.Ohayon MM (2002). Epidemiology of insomnia: what we know and what we still need to learn. Sleep Medicine Reviews. doi:10.1053/smrv.2002.0186Population reviews find about a third of adults report insomnia symptoms and 9-15% have insomnia with daytime consequences.
  2. 2.National Heart, Lung, and Blood Institute (2022). Insomnia — What Is Insomnia?. NHLBI, National Institutes of Health. linkDefines insomnia and the chronic-insomnia threshold of 3+ nights a week for more than 3 months not fully explained by another condition, and that CBT-I and healthy sleep habits are recommended.
  3. 3.Centers for Disease Control and Prevention (2024). About Sleep. CDC — Sleep. linkAdults are recommended at least 7 hours of sleep, and short sleep is associated with higher risk of obesity, diabetes, high blood pressure, heart disease and stroke.
  4. 4.Winkelman JW (2021). In the Clinic: Insomnia. Annals of Internal Medicine. doi:10.7326/AITC202103160A structured history and evaluation guide insomnia diagnosis, with CBT-I as first-line management.
  5. 5.Edinger JD, Arnedt JT, Bertisch SM, et al. (2021). Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine systematic review, meta-analysis, and GRADE assessment. Journal of Clinical Sleep Medicine. doi:10.5664/jcsm.8988A graded systematic review finds behavioral treatments — CBT-I, stimulus control, sleep restriction, relaxation — improve sleep outcomes.

5 sources, numbered by first appearance. General health information, not medical advice. AI-assisted editorial content — citations link their sources. Editorial policy