Leg Cramps At Night: Causes And Tips for Prevention - GoodRx (2024)

Key takeaways:

  • Long-acting beta agonist inhalers, diuretics, and statin are among the medications most likely to cause leg cramps at night.

  • Pregnancy, heart conditions, and liver or kidney problems can also make leg cramps more likely. Often, once your health condition is managed, the cramps will improve.

  • The best way to prevent leg cramps at night is to stay hydrated and incorporate movement into your daily routine. Regular stretching and massage can also help. If you’re experiencing leg cramps at night often, talk to your healthcare team. They can look at your medical history to determine the best course of action.

Table of contents

About leg cramps

Medication causes

Condition-related causes

Other causes

Prevention

Treatment

Bottom line

References

Leg Cramps At Night: Causes And Tips for Prevention - GoodRx (1)

There’s nothing better than a good night’s sleep. And nothing worse than a sudden, shooting pain in your leg that wakes you up and ruins your slumber. Leg cramps at night — officially known as nocturnal leg cramps — are a common cause of leg pain that disrupts your sleep. About half of all adults over the age of 60 experience them.

Leg cramps are characterized by sudden muscle tightness and pain, typically in the calf, that may last seconds to minutes. They’re also commonly referred to as a charley horse or muscle spasm. In many cases, leg cramps only happen occasionally and go away on their own. But what should you do if they’re a nightly issue?

What causes leg cramps at night?

There’s not always a clear cause of leg cramps at night. They’re more common in older adults and during pregnancy. But they can happen to anyone, even children.

WHAT TO READ NEXT

Popular stories this week

Leg Cramps At Night: Causes And Tips for Prevention - GoodRx (2)

10 Medications You Should Never Stop Abruptly

Leg Cramps At Night: Causes And Tips for Prevention - GoodRx (3)

7 Medications That May Cause Swollen Legs and Ankles

Leg Cramps At Night: Causes And Tips for Prevention - GoodRx (4)

12 Medications That Cause Hair Loss

View more

We do know that certain medications and health conditions make leg cramps at night more likely (more on that next). So if your sleep is often disturbed by leg pain, it’s best to talk to your healthcare team. They can take a look at your overall medical history to see if there’s a likely culprit and figure out next steps to address any issues.

Which medications can cause leg cramps at night?

The first place to look for what’s causing your leg cramps is your medication list. There are several different medications that are associated with a higher risk of nightly leg cramps. Here are some of the common offenders.

Long-acting beta agonists

Long-acting beta agonists (LABAs) are inhaled medications that are used to treat asthma and chronic obstructive pulmonary disorder (COPD). They’re typically combined with an inhaled steroid, as LABAs can have dangerous side effects if used alone.

Leg cramps at night are more likely in people who are using inhaled LABAs. It’s not clear if the medication is a direct cause of nighttime cramps, or the underlying conditions they’re used to treat. But it’s possible that these medications stimulate the beta receptors in leg nerves, leading to pain and cramping.

Some diuretics

Diuretics are medications typically used to treat conditions such as heart failure, high blood pressure, and edema (excess fluid). Two types of diuretics are associated with an increased risk of leg cramps: potassium-sparing diuretics and thiazide diuretics.

Potassium-sparing diuretics include triamterene (Dyrenium), spironolactone (Aldactone) and eplerenone (Inspra). Thiazide diuretics include chlorthalidone and hydrochlorothiazide.

Diuretics can change the levels of electrolytes such as sodium, chloride, and/or potassium. But there isn’t clear evidence that electrolyte changes are connected to nocturnal leg cramps. So we don’t know for sure why leg cramps are more common in people taking these medications.

Iron sucrose

Iron sucrose (Venofer) is an intravenous (IV) medication that treats anemia (low red blood cell count). It’s estimated that up to 23% of people receiving iron sucrose may develop leg cramps at night.

Conjugated estrogens (Premarin)

Conjugated estrogens (Premarin) is a medication used for conditions such as menopause, osteoporosis, and breast cancer. It’s estimated that up to 14% of people taking conjugated estrogens may develop leg cramps at night.

Raloxifene (Evista)

Raloxifene (Evista) is a medication used to treat and prevent osteoporosis and breast cancer. It’s estimated that up to 12% of people taking raloxifene may develop leg cramps at night.

Statins

Statins are medications used to lower high cholesterol levels. Common statins include atorvastatin (Lipitor), simvastatin (Zocor), and rosuvastatin (Crestor). While statins are associated with an increased risk of general muscle pain, it’s not clear if this includes leg cramps at night.

That being said, if you’re experiencing nocturnal leg cramps after starting a statin, let your prescriber know. Switching to a different statin may solve the issue.

Miscellaneous medications

Other medications may cause leg cramps at night, but this risk doesn’t seem to be as high as those listed above. Medications with a lower association of causing leg cramps at night include:

  • Bupropion (Wellbutrin)

  • Celecoxib (Celebrex)

  • Cetirizine (Zyrtec)

  • Fluoxetine (Prozac)

  • Naproxen (Aleve, Naprosyn)

  • Pregabalin (Lyrica)

  • Sertraline (Zoloft)

  • Ipratropium / albuterol inhaler (Combivent)

  • Levalbuterol inhaler (Xopenex)

  • Teriparatide (Forteo)

  • Zolpidem (Ambien)

  • Eszopiclone (Lunesta)

What health conditions can raise the risk of leg cramps at night?

There are a number of health conditions that may raise your risk of having leg cramps at night. The most common include:

There are several reasons why these conditions may cause leg cramps at night. They may reduce blood flow to the leg muscles, affect the nerves in the legs, or change electrolyte levels in the body. In some cases, once the underlying condition is managed, leg cramps may improve.

What else might cause leg cramps at night?

Aside from the medications and conditions mentioned above, there are other factors that can lead to leg cramps at night. You could be more likely to experience leg cramps at night if you are:

It’s clear that regular movement can help reduce your risk of leg cramps at night. And be sure to stretch and refuel after intense exercise to help prevent cramps from happening.

What can help prevent leg cramps at night?

There are a number of medication-free options you can try to help prevent leg cramps at night. In most cases, these lifestyle changes are more effective than other treatment options.

Proper hydration throughout the day is key — especially after you exercise. Speaking of exercise, do your best to incorporate regular movement into your daily routine. And limit your caffeine intake.

Mild exercise before bedtime (such as a few minutes on a stationary bike or treadmill) can help prevent cramps. You should also try regular stretching and massage of your leg muscles.

How can you treat leg cramps at night?

There isn’t a proven treatment option for nighttime leg cramps. But there are several things you can try to help lessen your symptoms.

As mentioned, if you have a health condition that contributes to leg cramps at night, managing the condition can help reduce cramping. You should also have a healthcare professional review your medication list to see if any of your medications may be at fault for your cramps.

You should also incorporate some lifestyle changes to help prevent leg cramps from happening.

After these steps, if you’re still having leg cramps at night there are some other treatment options you can try. Keep in mind that none of these medications or supplements have strong evidence about their effectiveness. And be sure to get your prescriber’s OK before starting anything new to make sure it’s safe for you. These alternative options include:

  • Muscle relaxants: Prescription medications such as orphenadrine, carisoprodol (Soma), and cyclobenzaprine (Flexeril) relax the muscles and may help treat leg cramps. But they can be sedating and aren’t recommended for older people. So they may not be a safe option for everyone.

  • Vitamin B complex: There’s preliminary evidence from one small study of older adults that vitamin B complex can reduce the frequency and duration of leg cramps at night. But this study only included people living with high blood pressure. And symptoms only improved after 3 months of treatment.

  • Magnesium supplements: Studies have shown that oral magnesium supplements can reduce leg cramps at night during pregnancy. Outside of pregnancy, study results are mixed as to whether or not magnesium is effective. One study found an improvement in leg cramps after 60 days of treatment with magnesium hydroxide. But a review of the available studies found no benefit from magnesium supplements.

  • Calcium channel blockers: There is very limited evidence that calcium channel blockers such as diltiazem (Cardizem) and verapamil (Verelan) can improve leg cramps. These medications are typically used for high blood pressure and other heart-related conditions. So they have heart-related side effects to consider, and may not be appropriate for everyone.

  • Gabapentin (Neurontin): Gabapentin is a prescription medication used to treat seizures and nerve pain. There’s some evidence that it can also help relieve symptoms of leg pain at night.

Good to know: Quinine, a medication that treats malaria, was commonly prescribed in the past for leg cramps at night. But it has a high number of serious risks and side effects, such as hearing loss and irregular heartbeats. The FDA warned against taking quinine for leg cramps in 2010. So it’s no longer a recommended treatment option.

The bottom line

Although we don’t know for sure what causes leg cramps at night, there are certain medications and health conditions that can make them more likely. Long acting beta-agonist inhalers, diuretics, and statins are the most common medications that cause leg cramps at night. Pregnancy, heart conditions, and kidney or liver problems can also raise the risk of nighttime leg cramps. In many cases, managing your health condition or changing your medication will resolve your leg cramps.

Steps you can take to prevent leg cramps include proper hydration and regular exercise. Stretching and massaging your legs before bed can also help. There aren’t any proven medications or supplements that treat leg cramps at night. It’s best to talk to your healthcare team to determine the best way to manage them.

References

Allen, R. E., et al. (2012). Nocturnal leg cramps. American Family Physician.

American Cancer Society. (2024). Leg cramps.

View All References (24)

expand_more

American Pregnancy Association. (n.d.). Leg cramps during pregnancy.

Baltodano, N., et al. (1988). Verapamil vs quinine in recumbent nocturnal leg cramps in the elderly. Archives of Internal Medicine.

Barna, O., et al. (2021). A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps. Nutrition Journal.

Bordoni, B., et al. (2023). Muscle cramps. StatPearls.

Chan, P., et al. (1998). Randomized, double-blind, placebo-controlled study of the safety and efficacy of vitamin B complex in the treatment of nocturnal leg cramps in elderly patients with hypertension. Journal of Clinical Pharmacology.

Dahle, L. O., et al. (1995). The effect of oral magnesium substitution on pregnancy-induced leg cramps. American Journal of Obstetrics and Gynecology.

Delacour, C., et al. (2020). Association between physical activity and nocturnal leg cramps in patients over 60 years old: A case-control study. Scientific Reports.

Delacour, C., et al. (2020). Association between alcohol consumption and nocturnal leg cramps in patients over 60 years old: A case-control study. Annals of Family Medicine.

Freedman, M. (2023). Muscle cramps. Merck Manual Professional Version.

Garrison, S. R., et al. (2012). Nocturnal leg cramps and prescription use that precedes them: A sequence symmetry analysis. JAMA Internal Medicine.

Katzberg, H. D., et al. (2010). Assessment: Symptomatic treatment for muscle cramps (an evidence-based review): Report of the Therapeutics and Technology Assessment Subcommittee of the American Academy of Neurology. Neurology.

Lam, C. S. E., et al. (2022). Primary care approach to calf cramps. Singapore Medical Journal.

MedlinePlus. (2023). Charley horse.

Moretti, A. (2021). What is the role of magnesium for skeletal muscle cramps? A Cochrane Review summary with commentary. Journal of Musculoskeletal and Neuronal Interactions.

National Kidney Foundation. (2015). Hemodialysis.

Grandner, M. A., et al. (2017). Nocturnal leg cramps: Prevalence and associations with demographics, sleep disturbance symptoms, medical conditions, and cardiometabolic risk factors. PLOS One.

Hallegraeff, J., et al. (2017). Criteria in diagnosing nocturnal leg cramps: A systematic review. BMC Family Practice.

Hogan, D. B. (2015). Quinine: Not a safe drug for treating nocturnal leg cramps. Canadian Medical Association Journal.

Schwab, R. J. (2022). Parasomnias. Merck Manual Professional Version.

Serrao, M., et al. (2000). Gabapentin treatment for muscle cramps: An open-label trial. Clinical Neuropharmacology.

Stojaković, N., et al. (2013). Simvastatin-induced nocturnal leg pain disappears with pravastatin substitution. Serbian Archives of Medicine.

U.S. Food and Drug Administration. (2017). FDA review finds no significant increase in risk of serious asthma outcomes with long-acting beta agonists (LABAs) used in combination with inhaled corticosteroids (ICS).

U.S. Food and Drug Administration. (2017). FDA drug safety communication: New risk management plan and patient medication guide for Qualaquin (quinine sulfate).

Young, G. (2015). Leg cramps. BMJ Clinical Evidence.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Subscribe and save.

Get prescription saving tips and more from GoodRx Health. Enter your email to sign up.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.

Leg Cramps At Night: Causes And Tips for Prevention - GoodRx (2024)

FAQs

What is the best thing to stop leg cramps at night? ›

Stretch: Straighten your leg and then flex it, pulling your toes toward your shin to stretch the muscles. Stretch the cramped muscle, and gently rub. For a thigh cramp, try pulling the foot on that leg up toward your buttock.

What is the number one cause of leg cramps at night? ›

Most of the time, there's no known cause for night leg cramps. In general, they're likely the result of tired muscles and nerve problems. The risk of having night leg cramps increases with age. Pregnant people also are more likely to have night leg cramps.

What can I drink before bed to prevent leg cramps? ›

It appears that 325 milligrams of quinine taken by mouth at bedtime typically relieves nocturnal leg cramps, but lower starting doses are appropriate for senior citizens and individuals with impaired renal function.

What are you lacking if you get leg cramps at night? ›

There's evidence—although much of it is mixed—that calcium, magnesium, and potassium imbalances play a part in cramping. Each of these electrolytes helps maintain fluid balance in the blood and muscles, and so it makes some sense that, if they're out of whack, cramping may ensue.

What drink stops leg cramps? ›

Some drinks can stop leg cramps when they start. These drinks include electrolyte drinks, coconut water, and pickle juice. There's evidence that electrolyte drinks can prevent leg cramps, too, but there isn't a best electrolyte drink for leg cramps.

What vitamin stops leg cramps at night? ›

Some research does suggest that certain vitamins and minerals could provide relief.
  • Vitamin B complex. At least one study found this combination effective. ...
  • Vitamin D. Very low levels of vitamin D may contribute to muscle cramps. ...
  • Potassium.
Feb 6, 2024

Do bananas help leg cramps? ›

You probably know that bananas are a good source of potassium. But they'll also give you magnesium and calcium. That's three out of four nutrients you need to ease muscle cramps tucked under that yellow peel. No wonder bananas are a popular, quick choice for cramp relief.

Why does vinegar stop leg cramps? ›

Acetic acid is postulated to mitigate cramping by decreasing alpha motor neuron activity through oropharyngeal stimulation and inhibitory neurotransmitter production, while aiding in the role acetylcholine plays in muscle contraction and relaxation.

How do you stop cramps at night fast? ›

If you want to get rid of your period cramps fast while in bed, then reaching for a hot water bottle might be a good idea. Not only does the heat improve blood flow to your uterus, it also helps loosen and relax your muscles. This can reduce cramps and promote a better night's sleep.

Can drinking more water stop leg cramps? ›

Takeaways. Muscle cramps can be painful, but they're usually short-lived and not a cause for concern. Self-care like stretching, heat, and massage can help with discomfort in the moment, while stretching and drinking enough water may prevent cramps from happening.

Why was I having horrible leg cramps prevention magazine? ›

Extreme anxiety and stress, caffeine overuse, and sleep deprivation are some of the reported triggers.” Treatments can include lifestyle modification, vitamin supplementation, thyroid medications, or a short course of anti- seizure meds. In most cases the twitches and cramps simply resolve on their own over time.

How do I stop leg cramps while sleeping? ›

To relieve night leg cramps, try to:
  1. Stretch the leg and flex the foot up toward the face.
  2. Massage the muscle with ice.
  3. Walk or shake the leg.
  4. Take a hot shower and point the water at the cramped muscle, or soak in a warm bath.

What is the best over the counter medicine for leg cramps? ›

Best Anti-Inflammatory Medicines
  • #1. Advil.
  • #2. Motrin.
  • #3. Aleve.

How to stop aching legs at night? ›

Lifestyle and home remedies
  1. Try baths and massages. Soaking in a warm bath and massaging the legs can relax the muscles.
  2. Apply warm or cool packs. ...
  3. Establish good sleep hygiene. ...
  4. Exercise. ...
  5. Avoid caffeine. ...
  6. Consider using a foot wrap or a vibrating pad.
Jan 26, 2024

Do bananas help with leg cramps? ›

You probably know that bananas are a good source of potassium. But they'll also give you magnesium and calcium. That's three out of four nutrients you need to ease muscle cramps tucked under that yellow peel. No wonder bananas are a popular, quick choice for cramp relief.

What is the best over-the-counter medicine for leg cramps? ›

Best Anti-Inflammatory Medicines
  • #1. Advil.
  • #2. Motrin.
  • #3. Aleve.

How to stop muscle cramps fast? ›

But there are things you can do to try and stop muscle cramps fast:
  1. Stretch the affected area.
  2. Massage the affected area with your hands or a massage roller.
  3. Stand up and walk around.
  4. Apply heat or ice.
  5. Take over-the-counter (OTC) pain relievers like ibuprofen or acetaminophen.

References

Top Articles
Latest Posts
Article information

Author: Lilliana Bartoletti

Last Updated:

Views: 5931

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.