Three classes of commonly prescribed medications have the strongest links to nighttime leg cramps: diuretics (water pills), statins (cholesterol-lowering drugs), and long-acting inhaled bronchodilators used for asthma and COPD. But several other medications can trigger them too, and the reasons vary depending on the drug. Here’s what’s known about each one and why they cause those painful middle-of-the-night contractions.
Diuretics (Water Pills)
Diuretics are among the most frequently implicated medications. These drugs work by helping your kidneys flush out extra fluid, which lowers blood pressure but also drains key minerals your muscles need to function properly. The specific types most associated with cramping include thiazide diuretics like hydrochlorothiazide, loop diuretics like furosemide, and combination pills like triamterene-hydrochlorothiazide.
The mechanism isn’t as simple as “low potassium,” though that’s part of it. Diuretics can deplete potassium, magnesium, and in the case of loop diuretics, calcium. But even potassium-sparing diuretics, which are specifically designed not to lower potassium, still cause cramps. The one thing all diuretics share is that they reduce your overall fluid volume. That volume contraction appears to be the common thread: when your body has less circulating fluid, your muscles become more excitable and prone to involuntary contractions, especially at night when you’re not moving and blood flow to your legs naturally slows.
Statins (Cholesterol Medications)
Statins are well known for causing muscle-related side effects, and cramps are a significant part of that picture. In a study of statin users, about 13% reported muscle cramps. The two most commonly prescribed statins, atorvastatin (Lipitor) and rosuvastatin (Crestor), both carry this risk, though the severity profile differs somewhat.
Among atorvastatin users in one study, roughly 60% reported some degree of muscle cramping, with about 16% rating it as severe. Rosuvastatin users reported cramping at an even higher overall rate (around 70%), but severe cases were much less common at about 5%. These numbers reflect all muscle cramps, not exclusively nighttime ones, but nighttime is when cramps tend to strike hardest because muscles are at rest and more vulnerable to spontaneous contractions.
Statins are thought to affect the energy-producing structures inside muscle cells, making muscles fatigue more easily and contract when they shouldn’t. If you’ve started a statin and noticed new leg cramps at night, it’s worth tracking when they began relative to your prescription start date.
Inhaled Bronchodilators for Asthma and COPD
Long-acting bronchodilators, the inhalers many people use daily for asthma or COPD, have a surprisingly strong connection to muscle cramps. These drugs relax the smooth muscle in your airways so you can breathe more easily, but they also affect skeletal muscle throughout your body. In one study of patients on these inhalers, 62% reported muscle cramps and 39% reported muscle twisting or twitching.
The combination inhalers that pair a bronchodilator with a corticosteroid (like salmeterol-fluticasone) showed the strongest association with cramping, followed by bronchodilators used alone. The mechanism involves stimulation of receptors in skeletal muscle that alter potassium balance within the cells, making the muscles more likely to fire on their own.
Osteoporosis Medications
Raloxifene, a drug prescribed to prevent and treat osteoporosis in postmenopausal women, lists leg cramps as a very common side effect. More than 12% of users experience muscle spasms or leg cramps. This is high enough that if you’re taking raloxifene and experiencing nighttime cramps, the medication is a likely contributor.
Psychiatric Medications
Certain antipsychotic medications can cause leg cramps and restlessness, particularly at night. Olanzapine, commonly prescribed for bipolar disorder and schizophrenia, has been linked to cramps in both legs that typically appear two to three hours after taking the evening dose. This is considered a relatively rare side effect, and switching to a different antipsychotic has been shown to resolve it.
How to Tell Cramps From Restless Legs
If you’re waking up with leg discomfort, it helps to know whether you’re dealing with actual cramps or restless leg syndrome, because the causes and treatments differ. A nocturnal leg cramp is a sudden, involuntary contraction, usually in the calf or foot, that’s painful and makes the muscle feel rock-hard for seconds to minutes. Restless leg syndrome, by contrast, involves an uncomfortable sensation (crawling, tingling, aching) with a strong urge to move your legs. The key distinction: moving makes restless legs feel better, while a cramp locks your muscle in place and movement doesn’t immediately release it. Both can disrupt sleep, but they point to different underlying issues.
What Can Help
If you suspect a medication is causing your nighttime cramps, the most important step is identifying which drug is the likely culprit based on when the cramps started. For diuretic-related cramps, the issue may improve by addressing mineral losses, particularly magnesium and potassium, though the fluid-volume component is harder to offset without changing the medication itself.
B vitamins have shown genuine promise. In a controlled trial of elderly patients with hypertension who suffered severe nocturnal leg cramps, a B-complex supplement taken three times daily led to prominent remission in 86% of patients after three months, while the placebo group saw no improvement. The supplement reduced the frequency, intensity, and duration of cramps. Stretching before bed has mixed results in studies, helping some people and making no difference for others.
One treatment to actively avoid is quinine. Although quinine does reduce leg cramps, the FDA has specifically warned against its use for this purpose. The only FDA-approved use of quinine is treating malaria, a rare infection in the U.S. When used for leg cramps, quinine can cause severe and potentially fatal blood disorders, including dangerously low platelet counts and a condition that can lead to permanent kidney damage. Despite these warnings, off-label use for leg cramps has remained common enough that the FDA required the manufacturer to issue direct warnings to both patients and prescribers.

