Why Do I Cough When I Sleep? Causes and Fixes

Coughing that starts or worsens when you lie down usually comes from one of a handful of causes: post-nasal drip, acid reflux, asthma, allergens in your bedding, or dry air. Lying flat changes how fluids move through your body, how your airways respond to irritants, and how well your throat can clear itself. That’s why a cough you barely notice during the day can keep you up at night.

Post-Nasal Drip

Your nose and sinuses produce mucus constantly, and during the day, gravity pulls it down the back of your throat where you swallow it without thinking. When you lie down, that drainage pools at the back of your throat instead of flowing downward. The accumulated mucus tickles the nerve endings in your throat, triggering a cough reflex. If you notice the cough gets worse as soon as you’re horizontal, or you feel a tickle or thickness in the back of your throat at bedtime, post-nasal drip is the most likely culprit.

Allergies, sinus infections, and even cold, dry air can increase mucus production and make post-nasal drip worse. Seasonal patterns are a good clue: if the cough appears during allergy season or after a cold, drainage is probably driving it.

Acid Reflux at Night

Acid reflux is one of the most overlooked causes of nighttime coughing, partly because it can trigger a cough without ever causing heartburn. When you’re upright, gravity keeps stomach acid in your stomach. Lying flat removes that advantage. At the same time, several other protective mechanisms slow down while you sleep: your esophagus becomes less efficient at pushing acid back down, the muscular valve at the top of your esophagus relaxes, and saliva production drops, reducing your body’s ability to neutralize acid. Swallowing also decreases during sleep, so acid that does creep upward lingers longer in the esophagus.

On top of all that, your stomach actually produces more acid at night while emptying food and fluid more slowly. The result is that tiny amounts of acid can reach the back of your throat or even your airway, irritating the tissue and provoking a cough. You might not feel the classic burning sensation at all. A persistent dry cough that’s worse at night, especially after eating late, is a common reflux pattern.

Cough-Variant Asthma

Not all asthma involves wheezing or shortness of breath. Cough-variant asthma produces a dry, persistent cough as its primary (sometimes only) symptom, and it frequently worsens at night. The airways narrow and become more reactive during sleep due to natural shifts in hormones and nervous system activity that occur overnight. Cold bedroom air or allergens in your bedding can compound the effect.

This type of asthma is diagnosed through lung function tests combined with a trial of asthma medication. If the medication relieves the cough, that confirms the diagnosis. It’s worth considering if your nighttime cough has lasted weeks and doesn’t seem connected to a cold, allergies, or reflux.

Bedroom Allergens

Your bed is a prime habitat for dust mites. These microscopic creatures thrive in warm, humid environments and feed on the skin cells you shed. Bedding, pillows, padded headboards, and bedroom carpeting are their preferred territory. When you lie down and shift around, you stir up dust mite allergens into the air you’re breathing, which is why symptoms tend to be worst during sleep.

If your cough comes with a stuffy nose, sneezing, or itchy eyes at bedtime, dust mites (or pet dander, if animals share your room) are strong suspects. Washing bedding weekly in hot water, using allergen-proof mattress and pillow covers, and removing carpet from the bedroom can make a noticeable difference.

Dry Air and Environmental Irritants

Breathing dry air for hours irritates the lining of your throat and airways, triggering a cough. This is especially common in winter when heating systems pull moisture from indoor air. The Environmental Protection Agency recommends keeping indoor relative humidity between 30% and 50%, though some research suggests 40% to 60% is optimal. A simple hygrometer (available for a few dollars) can tell you where your bedroom falls. If it’s below 30%, a humidifier in the bedroom often reduces nighttime coughing within a day or two.

Heart-Related Causes

In rarer cases, nighttime coughing signals a heart problem. When the heart isn’t pumping efficiently, lying down causes blood to shift from your legs into your lungs. A weakened heart can’t move this extra volume out fast enough, so fluid builds up and puts pressure on the lungs. This can cause coughing, breathlessness, or the sensation of waking up gasping for air. These episodes typically happen a few hours into sleep and improve when you sit upright. If you’re also experiencing swollen ankles, unusual fatigue, or shortness of breath with mild activity, the cough may be heart-related rather than respiratory.

What Helps Reduce Nighttime Coughing

Elevating your head is one of the simplest and most effective changes. An extra pillow or a wedge under the head of your mattress helps drainage flow downward instead of pooling in your throat, and it reduces the chance of stomach acid creeping into your esophagus. This single adjustment addresses two of the most common causes at once.

For coughs driven by mucus and congestion, over-the-counter medications containing an older-generation antihistamine (like diphenhydramine or chlorpheniramine) can help. These reduce mucus secretion and slightly widen the airways, which is useful at bedtime. A cough suppressant containing dextromethorphan can quiet the cough reflex itself, while an expectorant containing guaifenesin thins mucus so it clears more easily. Be cautious with decongestants before bed: pseudoephedrine can cause jitteriness and interfere with sleep, and the common substitute phenylephrine has been shown to offer minimal benefit when taken orally.

For reflux-related coughing, avoid eating within two to three hours of bedtime, and steer clear of foods that relax the valve between your stomach and esophagus (alcohol, chocolate, fatty foods, and caffeine are common offenders). Sleeping on your left side can also help, since it positions the stomach below the esophagus.

When a Nighttime Cough Needs Attention

A cough lasting more than eight weeks in adults, or more than four weeks in children, is classified as chronic and warrants evaluation. But duration isn’t the only signal. A nighttime cough accompanied by blood, unexplained weight loss, drenching night sweats, or progressive shortness of breath shouldn’t wait eight weeks. The same applies if you’re waking up gasping or unable to catch your breath, which may point to cardiac or more serious respiratory issues. For most people, though, nighttime coughing traces back to one of the common causes above, and targeted changes to your sleep environment or positioning bring real relief.