Many people complain about painful leg cramps that wake them at night. The pain they cause can be excruciating, even making grown-ups cry.

Their doctors have nothing they can prescribe for this problem. At one time, they used to prescribe quinine. The FDA decided, however, that this botanical derivative is too dangerous to use for a common problem like nighttime leg cramps. Quinine can cause a life-threatening blood disorder as well as heart rhythm irregularities or severe allergic responses. Although such reactions are rare, they can be extremely serious. As a result, doctors may end up recommending home remedies like tonic water (which contains quinine) or bananas. They might even advise their patients to take magnesium to correct an electrolyte imbalance.

Is Magnesium Deficiency the Cause of Painful Leg Cramps?

New research published in JAMA Internal Medicine suggests, however, that magnesium supplements are no more effective than placebo. In a small randomized, controlled trial, Israeli investigators administered magnesium oxide supplements or placebo to 88 volunteers with nighttime leg cramps. The dose was 865 mg of magnesium oxide, providing 520 mg of free magnesium.

During the month-long study, participants recorded the number of cramps they experienced at night. There was no statistical difference between the two groups. The authors conclude that magnesium supplements are unlikely to offer any benefit for nighttime leg cramps.

Maor et al, JAMA Internal Medicine, May, 2017

Why This Study Might Not Be the Last Word:

We are always thrilled when scientists decide to test a home remedy such as magnesium through a randomized controlled trial. Given that this research had such unimpressive results, no other researchers may want to study magnesium to prevent painful leg cramps. But we are not entirely convinced that this is the last word.

The study authors were careful to calculate ahead of time how many volunteers they would need in the trial for reasonable certainty that the results would be reliable:

“We estimated that 110 participants would be needed in each group to achieve 80% power to detect a treatment difference at a 2-sided .05 significance level if the true difference between treatments is 1 (difference in mean change between treatment groups) NLC per week.” [NLC stands for nocturnal leg cramp.]

So, to get a statistically reliable result, they would have needed 220 volunteers, but they were able to recruit less than half that many. That is why we are reserving judgment on whether or not magnesium supplements are truly useless against painful leg cramps at night. It is not that this study is wrong; but rather, it is not complete.

What Can You Do for Nighttime Leg Cramps?

Many readers will be skeptical about the results of this trial, since they have found that magnesium supplements help them avoid leg cramps. As one example, Rose in Clearwater, FL, wrote:

“Magnesium definitely takes away muscle cramps. I just take small doses occasionally (as needed). Amazing relief!”

Others will turn to one of the home remedies we have written about before. Some of these remedies appear implausible. Who would imagine that swallowing yellow mustard could help? Yet, there is actually a likely explanation for mustard, ginger or other strong flavors stopping leg cramps quickly.

Even more improbable, many readers have put a bar of soap under the bottom sheet and found that it prevents leg cramps while they sleep. We still don’t know for sure how this works, but there a few hypotheses. You can read more about these and other remedies to help nighttime leg cramps in our Guide to Leg Pain.


Get The Graedons' Favorite Home Remedies Health Guide for FREE

Join our daily email newsletter with breaking health news, prescription drug information, home remedies AND you'll get a copy of our brand new full-length health guide — for FREE!

  1. Jean

    Jean H.

    After spending many sleepless nights with severe calf cramps, I increased my Magnesium intake from 200 mg to 400 mg. daily. My regimen is 200 at breakfast and 200 at bedtime. Cramps disappeared completely.

  2. Patty

    Magnesium supplements actually cause nighttime leg cramps for me. What I have personally found to work, after having many many excruciatingly painful episodes, is to not eat certain foods late in the day, which include sugary, sweet or high carb foods. For example, if I eat candy, fruit, or root vegetable chips after dinner, I can count on waking up to painful leg cramps in the night. I’ve actually had the experience of having a debilitating leg cramp episode an hour after eating a large piece of fudge in the afternoon.

  3. GREG


  4. Joyce

    Funny – I use Potassium supplements for manage my cramps. It works great!

  5. Chuck

    If you’ve recently had a steroid injection for allergies, it will deplete your magnesium to a point that you will have severe leg cramps within a week. Before the steroid injection, I used to take 400mg (two tablets) in the morning and 200mg (half a tablet of magnesium citrate) before bedtime to ward off leg cramps and that was enough to ward them off.

    Since having the steroid injection, I quadrupled my magnesium citrate before bedtime to 800mg. I seldom have severe leg cramps since doing this. A steroid injection is not worth the allergy relief with the severe leg cramps it brings on.

  6. Bubba
    Taos Ski Valley, New Mexico

    Last night I woke up at my vacation rental at Taos Ski Valley somewhat dehydrated in the middle of the night crying with a painful leg cramp in my right hamstring. Walking seem to stretch it out some and felt better than standing still and I walked into the bathroom to see if I had left any of the Amish formula Leg Cramp liquid made by Caleb Treeze & sold in heathfood stores, I found some and drank a capful straight and my painful cramp was gone in less than a minute. I felt it start tighten up again today and drank it with OJ and (so far) no more pain. Im going to go drink another one now.

  7. Jim
    Louisville, KY

    I was having painful night cramps in my legs. ‘Somewhere” I read that magnesium might help; also potassium. So I began taking both daily nearly a year ago and haven’t had a night cramp since. I can’t say it’s the magnesium (250 mg) or the potassium gluconate (595 mg), but I am convinced it is one or both of them that brought relief.

  8. Gary

    I put the leg with cramps in hot water. Cramps quickly go away. I think I’ll try the yellow mustard.

  9. Ellen

    I tried the magnesium oxide. A waste of money. I switched to magnesium lactate and leg cramps gone. I heard the magnesium citrate works as well. Please look at these other 2 forms of magnesium. Possibly the body absorbs these better.

    • lynne

      Am desperate for help. Which magnesium is preferable? Lynne

      • Steve

        I would try magnesium taurate before bed. Cramps are sometimes caused by a taurine deficiency.
        If that doesn’t work, swallow that magnesium capsule with a small glass of water with 1/4 tsp of unprocessed sea salt and 1/4 tsp of cream of tartar in the water to balance electrolytes with sodium and potasium.

  10. Eva

    I could not live without magnesium supplements! I would have horrible leg cramps, headaches, and hiccups.
    However, my body can not absorb magnesium oxide, so I buy magnesium citrate or triple magnesium complex. Still I have to take a triple dose of the triple capsules! Lately I have found that it’s more effective if I take Potassium supplement and b-6 supplement at the same time as the magnesium. I believe that magnesium deficiency is very widespread. So not only do I take it daily, but also I have bought many bottles of supplement to give away to friends!!

  11. Patricia

    Magnesium oxide is the worst form of magnesium due to its poor absorption. What about magnesium citrate or glycinate?

  12. Pat
    San Antonio

    25 years ago I began having horrible nightly leg cramps and my doctor prescribed quinine and it worked miracles; but I was concerned about taking it long term so did some muscle cramp research. I started taking a Calcium, Magnesium, Zinc supplement daily and my cramps disappeared. About a year later, I ran out of my supplement and didn’t buy more – within a few weeks my cramps were back so I take the supplement daily and very very rarely ever have a leg cramp, and if it happens, mustard or pickle juice within minutes takes care of the pain.

  13. Mike

    I started using the soap probably 3 or 4 years ago I have had great results but I don’t do it under the sheets tried but every now and then when the cramp would start to bite the only way I could stop it was to put the soap on the area starting to hurt . Then it would stop . So I put 4 socks on with soap and if I feel a bite coming on I just slide the sock to that area with my feet and no problems . Also if I lie down in the afternoon I some time will have a cramp start in my feet I have 2 socks with what I call soap rubble just lots of little pieces in there I can slide on a slipper slide the rubble sock in the slipper all the little pieces form to the foot and the cramp stops this is not instant may be 5 minutes but it does not continue at the same intensity .Just things I’ve learned over time. I also take 2- 400 mg magnesium pills before bed time about 1 to 2 hours before crashing exact time does not seem to matter this all works for me I’ve been playing with all this a for a few years now and it works for me I care nothing about studies or reasons why it works at my age it works and that’s good enough for me let the young one’s figure out why. Good luck to all, Mike.

    • Lou

      Pickle juice? Swallow or rub on cramp lol? Magnesium, I take 200 to 300 mg every night and thigh muscle cramps have subsided 90% !

  14. Suzy

    I take potassium tablets nightly which seem to ward off painful leg cramps. Magnesium did not work for me. Suzy

  15. Edward
    Staten Island, NYC

    No amount of massage, nor walking around, or any other method to try and increase circulation to relieve them would help, until I discovered yellow mustard! One giant, heaping tablespoon always does the trick. By the time I’m finished, they are gone completely and never return. Yellow mustard is a godsend for me and hasn’t failed yet!

  16. Arlene
    Tampa, FL

    I have found that, for me, there is a strong correlation between how much iron is in my diet, and leg cramps. Too little = more cramps. Before bedtime I think about what I have eaten that day. If I haven’t had foods with much iron, I eat a small amount of raisins. Works for me!

  17. Stacy
    Ithaca, NY

    My mother’s horrific leg cramps have abated with the use of a magnesium spray. Transdermal application applied directly to the legs can be preferable to oral dosing for this problem. No pills and no GI effect.

  18. Char

    The last 9 months I have had severe night time leg cramps. recently started wearing low compression calf sleeves to bed and the cramps have stopped.

What Do You Think?

We invite you to share your thoughts with others, but remember that our comment section is a public forum. Please do not use your full first and last name if you want to keep details of your medical history anonymous. A first name and last initial or a pseudonym is acceptable. Advice from other commenters on this website is not a substitute for medical attention. Do not stop any medicine without checking with the prescriber. Stopping medication suddenly could result in serious harm. We expect comments to be civil in tone and language. By commenting, you agree to abide by our commenting policy and website terms & conditions. Comments that do not follow these policies will not be posted.

Your cart

Shipping and discount codes are added at checkout.