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.
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. For example, 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 much of the time, they have no identifiable cause. But common triggers include:
Exercise and fatigued muscles
Sitting, resting, or standing for long periods of time
Pregnancy
Aging, 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
Medications like naproxen, statins, diuretics, and inhaled medicines like salmeterol
What deficiency causes leg cramps at night?
Certain nutrient deficiencies can contribute to nocturnal leg cramps, including:
Magnesium: Your body uses magnesium 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 and calcium: Vitamin D supports muscle function and helps your body absorb calcium. Calcium is essential for normal muscle contraction and relaxation. Low levels of either nutrient can lead to increased muscle cramps.
Vitamin B1: Also called thiamine, vitamin B1 helps your body produce energy. Low vitamin B1 can lead to a condition called beriberi, which causes leg pain and cramps.
Vitamin B12: Vitamin B12 supports nerves and blood cells. Some small studies suggest that deficiency may cause muscle cramps.
Vitamins for leg cramps at night: Which are worth trying?
Let’s take a look at three common vitamin and mineral supplements for leg 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 otherwise, you’re likely getting enough magnesium from 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 supplements, experts don’t recommend it.
Quinine is a medicine that has been around since the 1930s. It’s also found in small amounts 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.
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 potentially 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 (MK-4) or menaquinone-7 (MK-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 fewer 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.
Frequently asked questions
To stop a leg cramp quickly, it can help to gently massage and stretch the affected muscle. For a lower leg cramp, try a seated stretch by slowly straightening the knee while pulling your toes up and toward you. You can also loop a rolled towel around the ball of your foot and pull the ends toward you. Standing up and putting your weight on the cramped leg may also help. Drinking fluids or an electrolyte drink may help if dehydration or an electrolyte imbalance contributed to the cramp.
Compression socks might help with leg cramps. Compression socks are snug-fitting socks that apply gentle pressure to your legs and ankles. This can help improve circulation by helping move blood back up your legs. Some evidence suggests that compression stockings may prevent recurrent leg cramps in middle-aged and older adults. But they haven’t been widely studied for other groups or people.
To stop a leg cramp quickly, it can help to gently massage and stretch the affected muscle. For a lower leg cramp, try a seated stretch by slowly straightening the knee while pulling your toes up and toward you. You can also loop a rolled towel around the ball of your foot and pull the ends toward you. Standing up and putting your weight on the cramped leg may also help. Drinking fluids or an electrolyte drink may help if dehydration or an electrolyte imbalance contributed to the cramp.
Compression socks might help with leg cramps. Compression socks are snug-fitting socks that apply gentle pressure to your legs and ankles. This can help improve circulation by helping move blood back up your legs. Some evidence suggests that compression stockings may prevent recurrent leg cramps in middle-aged and older adults. But they haven’t been widely studied for other groups or people.
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 experts?



References
Allen, R. E., et al. (2012). Nocturnal leg cramps. American Family Physician.
Bordoni, B., et al. (2023). Muscle cramps. StatPearls.
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.
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.













