What causes muscle cramps on a ketogenic diet?

By Dr. Stephen Phinney and the Virta Team

Cramps may occur for a variety of reasons. A mineral imbalance may manifest in physical symptoms like cramps and is often resolved by magnesium supplementation. However, a balance of other minerals like sodium and potassium (electrolytes) along with adequate hydration could be contributors to cramping as well. In particular, a low sodium intake forces the kidneys to waste potassium, with in turn can make muscles more irritable and prone to cramping. This interrelationship among hydration, electrolytes, and minerals gets pretty complex, so we devoted a chapter to this topic in our book ‘The Art and Science of Low Carbohydrate Performance’.

Back to Keto FAQ


Related blog posts

Dr. Stephen Phinney on Nutritional Ketosis and Ketogenic Diets: Video Series - Dr. Stephen Phinney put together a three-part video series on ketogenic diets and nutritional ketosis. You'll learn the nutrition science… ... Read More
Ketone Supplements: The Pros and Cons - Ketone supplements rapidly and transiently increase blood concentrations of BOHB. On the surface, this seems like it should promote positive… ... Read More
Sarah Hallberg, DO, MS Reversing Diabetes 101 with Dr. Sarah Hallberg: The Truth About Carbs, Blood Sugar and Reversing Type 2 Diabetes - You may have heard a lot about type 2 diabetes, but do you know what it actually does to your… ... Read More

23 Comments

  1. Avatar

    Thank you for this post! I had been getting SO MANY charlie horses and muscle cramps, especially at night when I was going to sleep. Sometimes I’d wake up in the middle of the night with a cramp! Added a magnesium supplement and it’s so much better!

    Reply

    1. Avatar

      how much do you take? i m currently at 400mg a day and also have cramps.. 🙁

      Reply

  2. Avatar

    Does Virta recommend a particular type of magnesium supplement, or way of taking it which allows it to be absorbed effectively by the body?

    Reply

    1. Virta Health

      You can find more information here on magnesium and what we use with our patients: https://blog.virtahealth.com/sodium-potassium-magnesium-ketogenic-diet/

      Reply

  3. Avatar

    I was Keto from January to December and suffered from very bad cramps at night for most of that time. I’ve been taking powdered magnesium daily for years, but I added potassium tablets and upped my salt in an effort to stop them. No luck.

    In December I went off Keto for a month and a half and the cramps disappeared. Now a little over three months into Keto again and they’re coming back. I hope there’s a breakthrough in this area. The conventional remedies haven’t worked for me.

    Reply

    1. Avatar
      Margaret-Ann Hanlon April 28, 2019 at 1:34 am

      I feel ya. I have tried everything with no luck. I go off keto for a week and no cramps. Back on it and within the week it starts. Mine usually hits around 4am. The more water I drink the worse the leg cramps. Someone has to have answers soon.

      Reply

  4. Avatar

    Yes I only took 2 Keri ( ultra burn) and within hours I was having severe cramping in thighs

    Reply

  5. Avatar

    I have struggled with cramping on keto. There can be no way a program is healthy if you need supplementation to stay healthy. I have tried magnesium (and doing 2 doses a day so that I am at about 150% of RDA), adding the morton salt that is part potassium, adding potassium, eat tons of leafy greens, home made broth with more salt added, tracking salt so that what I add to my foods is about 3000mg and then have more sprinkled on. I have tracked my cramps vs micro nutrients and there is no rhyme or reason. Nights I have more severe cramps, I might have had the most salt I have ever had. I am relatively healthy, not diabetic but middle aged and need to lose more weight. Low carb is the only program where appetite is managed and I don’t get hangry. SOMEONE please find a solution!

    Reply

  6. Avatar
    Cheeky Carlson May 11, 2019 at 3:39 pm

    Try “Pedialyte” or “Liquid IV”
    I dissolve half a package in water and problem solved!

    Reply

    1. Avatar

      How much Pedialyte were you drinking and how often?

      Reply

  7. Avatar

    I suffered severe attacks of muscle cramps on ketogenic diet,i try baking soda ,too much water,added magnesium,potassium,the cramps more and more attacking my chest ,my shoulders,my back.i can not live like that,then,i add some fruits like berries,apricots,kiwi,i felt better .my advice to all ,they must eat two servings of low or moderate GI fruits to let your sever muscle cramps and insomnia disappear soon.

    Reply

    1. Avatar
      Shirley Getzmeyer September 9, 2019 at 6:14 am

      What is GI fruits?

      Reply

  8. Avatar
    Gayle Larabie June 26, 2019 at 2:15 am

    Discovering this as well. I went back to weight watchers, increased vegies, and started eating berries more often- cramping slowly dissipated. Have to be on low sodium diet. Not sure what to do. Have had magnesium and potassium.

    Reply

  9. Avatar

    I made my own electrolyte solution based on this recipe: https://eatclosetohome.wordpress.com/2016/06/19/homemade-electrolyte-powder/ (except I don’t use the sugar, obviously (I do erythritol/monkfruit sweetener), or the calcium or the fruit fresh. I just mix plain lemon and lime juice in and take calcium separately at night.) I have a couple glasses of this every day, and I take magnesium and potassium supplements a couple times during the day too, and then once again at night with calcium. I don’t actually drink much plain water during the day anymore, just this stuff and maybe a glass of iced herbal tea. I still get the occasional mild lower leg cramp, especially if I’ve exercised a lot, but it’s mild and tolerable now–sometimes it doesn’t happen at all. So glad because this diet really agrees with me, and I had to stop it once before b/c of horrific leg cramps. I think the problem the first time was too much plain water, and waiting until nighttime to take minerals. I have more muscle strength too now, last time I could barely get up the stairs.

    Reply

  10. Avatar

    I’ve suffered bad Cramp’s also while on keto. The good news is that I talked with my doctor. He told me to take calcium, magnesium and zinc and eat 3 tums a day with it. It has done wonders for me!

    Reply

  11. Avatar

    Read up on liver dz and muscle cramping. I think a common denominator may be eating inorganic pork/bacon,. Most pigs are injected with 60cc syringes of a chemical cocktail every few weeks. This is a trade secret of commercial pig farming. And it is clogging your liver detoxification pathways. Magnesium, potassium, trace minerals, taurine, branch chain amino acids, water will help….and do not over eat.

    Reply

  12. Avatar

    Is it possible drinking too much water is contributing to this? Washing out of the all important potassium?/electrolytes. Coffee and tea in excess may also contribute? Diaretics.

    Reply

    1. Virta Health

      Certainly an imbalance of fluid to electrolytes can contribute to muscle cramps as does dehydration caused by diuretics. That is why sodium and potassium intake is such an important part of a well formulated ketogenic diet.

      Reply

  13. Avatar

    I used to have muscle cramp at nights while on keto diet. I tried drinking coconut water (not coconut milk or coconut oil) on daily basis to replenish electrolytes in my body, and alhamdulillah (all praises to God), the muscle cramp slowly went away.

    Reply

  14. Avatar

    What helped me in the past was apple cider vinegar – 1 shot in the morning with plenty of water to wash off the taste.
    I also have water with added pinch of salt during the day. Magnezium is not really helping – perhaps my body cannot absorb in this form.

    Also I find that more coffee I drink cramps get worse.

    Reply

  15. Avatar

    I have been on very low carb diets for many many years, eating low carb fermented & non-fermented veggies ,fish, nuts, seeds, eggs, healthy oils, herbal teas, a wide variety of vitamins & minerals (including calcium & magnesium , and no added salt or sugar or fruits (besides lemons & limes) –and very little meat the last few years, & no caffeine at all. My one regular processed food is diet Canada Dry ginger ale mixed half & half with water and stevia.
    When I rarely go off the diet, perhaps once a year, and splurge on ice cream , like clockwork, I get severe charley horse leg cramos 2 hours latter.
    Similarly when I eat a few high carb bananas (which I usually avoid) i get twisting painful cramp spasms in my fingers 10 minutes later – not my legs!!
    I did not realize that others on a low carb diet had this sort of problem –although perhaps the cramps for people like me are from not being strict ENOUGH regarding carbs, rather than from the diet itself. For when I suddenly go OFF the strict low carb diet is when I have cramping problems, NOT from being on the (very) low carb diet itself, during witch I feel fine, both physically & mentally.If you are getting cramps on the diet it may be from suddenly ingesting too many carbs, or too many simple sugars, espcially if you splurge and go off the diet temporarily.
    It’s like a warning telling you that you need to get back in line.
    I will experment with adding more a bit more salt and morepotassium rich low carb foods, which even on my varied diet is hard to achieve (4700mg daily of potassiem is recommended).
    Since they affect each other, there is supposed to be a ideal balance of things like salt, potassoum, calcium and magnesium and perhaps zinc for otherwise hralthy people – but what’s the ideal ratio and the best way to achieve that ratio on a very low carb diet? Where is that found?

    Reply

    1. Virta Health

      This post goes into more detail on balancing electrolytes: https://blog.virtahealth.com/potassium-sodium-ketogenic-diet/ However, you could go crazy trying to meet a specific ratio, so we encourage our patients to consume a couple of bouillon cubes per day, salt foods to taste and aim for 5 servings of veggies each day.

      Reply

  16. Avatar

    I have muscle spasms in my back, so painful I am sweating profusely. How can the keto diet be good for me?

    Reply

Leave a reply

Your email address will not be published.