provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeWell-beingSupplements and Herbs

Can Supplements Help Leg Cramps? A Close Look at Magnesium, Quinine, and Vitamin K

Cherilyn Davis, MDKatie E. Golden, MD
Written by Cherilyn Davis, MD | Reviewed by Katie E. Golden, MD
Published on June 2, 2025

Key takeaways:

  • Many people take vitamin and mineral supplements to help with leg cramps at night. Popular choices include magnesium, quinine, and vitamin K.

  • Based on research, magnesium is unlikely to help with leg cramps. But vitamin K supplements may reduce the intensity, frequency, and duration of leg cramps.

  • Quinine used to be a popular solution. But it’s no longer recommended due to potentially life-threatening side effects.

Woman with leg cramp in bed
MarianVejcik/iStock via Getty Images Plus

If you’re one of the many people who experience leg cramps at night, you’ll probably do just about anything to get rid of them. And since it’s not always clear what causes these leg cramps in the first place, it’s hard to know what will help. So, people try anything from tonic water to pickle juice to help. But is there any science behind these home remedies? 

We’ll take a deep dive on three popular options: magnesium, quinine, and vitamin K. And before taking a look at whether certain vitamins help, we’ll explore why leg cramps happen in the first place.

What causes leg cramps at night?

Leg cramps during the night — also called nocturnal leg cramps — happen for a variety of different reasons. And a lot of the time, they have no identifiable cause. But common causes include:

  • Exercise and fatigued muscles

  • Sitting, resting, or standing for long periods of time

  • Pregnancy

  • Increasing age, especially being over age 60, since tendons shrink as you get older

  • Electrolyte abnormalities, like high or low sodium

  • Neuromuscular conditions like amyotrophic lateral sclerosis (ALS)

  • Kidney and liver disease

  • Peripheral neuropathy, which is common in diabetes

  • Fibromyalgia

  • Medications like naproxen, statins, diuretics, and inhaled medicines like salmeterol

Search and compare options

Search is powered by a third party. By clicking a topic in the advertisement above, you agree that you will visit a landing page with search results generated by a third party, and that your personal identifiers and engagement on this page and the landing page may be shared with such third party. GoodRx may receive compensation in relation to your search.

What vitamin deficiencies can cause leg cramps at night?

If you’re deficient in one of the following vitamins, it may be contributing to nocturnal leg cramps:

  • Magnesium is a nutrient your body uses to regulate muscle and nerve function. Without it, your muscles are more likely to spasm and cramp. But this usually happens only if your levels are very low.

  • Vitamin D is also important for muscle function. And it helps you absorb calcium, which helps muscles properly contract and relax. Both low vitamin D and calcium lead to increased muscle cramps.

  • Vitamin B1 is also called thiamine. Your body uses it to produce energy. Low vitamin B1 can lead to a condition called beriberi, which causes leg pain and cramps.

  • Vitamin B12 supports blood and nerve health. Some small studies suggest that deficiency can cause muscle cramps.

Does magnesium work for leg cramps?

The research suggests that magnesium doesn’t work for leg cramps. Several large review studies have looked into this. And all of them concluded that magnesium wasn’t helpful. This includes:

  • A review of 11 studies in doses ranging from 100 mg to 520 mg of oral magnesium daily 

  • A review of 7 studies in doses ranging from 300 mg to 364 mg of oral magnesium daily

  • Another review of 7 studies of 900 mg of oral magnesium daily 

Magnesium may help if you have low levels of magnesium to begin with. But if you’re otherwise healthy, you’re likely getting enough magnesium in the foods that you eat. And any extra won’t help with leg cramps. 

Does quinine work for leg cramps?

The research on quinine suggests that it may help leg cramps. A review of the available evidence suggested it could be moderately helpful at doses around 300 mg a day. But the evidence was weak. And given the serious and potentially life-threatening side effects of taking quinine, experts don’t recommend it. 

Quinine is a medicine that has been around since the 1930s. It’s also found in tonic water — 1 L of tonic water contains about 60 mg to 70 mg of quinine. But as of now, quinine is only approved by the FDA for the treatment of malaria. 

GoodRx icon

In 2006, the FDA issued a warning about using quinine for leg cramps, stating that it wasn’t effective and could be dangerous. And since then, the FDA has continued to advise against its use for leg cramps given the potential life-threatening side effects like:

  • Low levels of platelets: Platelets help blood clot. With fewer platelets, there’s an increased risk of internal bleeding.

  • An exaggerated immune response: This can lead to organ damage.

  • Heart arrhythmias: This issue, also known as irregular heartbeats, can be life-threatening.

It’s particularly important to avoid quinine if you:

  • Take any medicines that prevent blood clotting

  • Have heart, liver, or kidney disease

  • Are pregnant or plan to become pregnant, since quinine can harm a developing baby

Does vitamin K work for leg cramps?

It’s possible that vitamin K may help leg cramps. But to date, not much research has been done.

The term “vitamin K” is used to describe a group of compounds, including K1 and K2. Vitamin K1 is found in green leafy vegetables. Vitamin K2 is listed as menaquinone-4 or menaquinone-7 in supplements. It's found in animal products. The limited research on vitamin K and leg cramps has focused on vitamin K2.

One large study found that people ages 65 and older who took 180 mcg of vitamin K2 had less leg cramps at night compared to placebo. Scientists reached the same conclusions in people on hemodialysis (a kidney disease treatment) who took 360 mcg daily of vitamin K2 for 4 weeks.

There isn’t a formal upper limit on how much vitamin K you can take. But avoid taking extra vitamin K if you take any blood thinners like warfarin. Too much vitamin K can interfere with how well warfarin works. And this can make it more likely for you to develop blood clots.

The bottom line

Leg cramps can be a real pain, especially if they prevent you from getting sleep. And while it may be tempting to reach for supplements, there isn’t much data to support using them. Also, supplements like vitamin K and quinine can have some serious side effects for certain groups of people. 

why trust our exports reliability shield

Why trust our experts?

Cherilyn Davis, MD
Cherilyn Davis, MD, is a board-certified pediatrician in New York City. She has held local and national roles at the American Medical Women’s Association including board member of the physician division and physician chair of social media.
Katie E. Golden, MD
Katie E. Golden, MD, is a board-certified emergency medicine physician and a medical editor at GoodRx.

References

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

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

View All References (17)

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.

El-Tawil, F., et al. (2015). Quinine for muscle cramps. Cochrane Database of Systematic Reviews.

FDA News for Health Professionals. (2012). Serious risks associated with using quinine to prevent or treat nocturnal leg cramps. U.S. Food and Drug Administration.

Frusso, R., et al. (1999). Magnesium for the treatment of nocturnal leg cramps: A crossover randomized trial. The Journal of Family Practice.

Garrison, S. R., et al. (2012). Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews.

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

Johnson, L. E. (2024). Thiamin deficiency. Merck Manual Consumer Version.

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.

Office of Dietary Supplements. (2021). Magnesium: Fact sheet for consumers. National Institutes of Health.

Office of Dietary Supplements. (2021). Thiamin: Fact sheet for consumers. National Institutes of Health.

Office of Dietary Supplements. (2021). Vitamin D: Fact sheet for consumers. National Institutes of Health.

Saguil, A., et al. (2016). Quinine for leg cramps. American Family Physician.

Tan, J., et al. (2024). Vitamin K2 in managing nocturnal leg cramps: A randomized clinical trial. JAMA Internal Medicine.

U.S. Food and Drug Administration. (2006). Drug products containing quinine; enforcement action dates. Federal Register.

Wolffenbuttel, B. H. R., et al. (2019). The many faces of cobalamin (vitamin B12) deficiency. Mayo Clinic Proceedings: Innovations, Quality & Outcomes.

Xu, D., et al. (2022). Vitamin K2 as a potential therapeutic candidate for the prevention of muscle cramps in hemodialysis patients: A prospective multicenter, randomized, controlled, crossover pilot trial. Nutrition.

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?

Simple Tips to Eat Healthier

Sign up for our GoodRx Diet and Nutrition Newsletter to receive the latest healthy eating advice, recipes, and savings that are most relevant to you.

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