How To Stop Muscle Cramps/Spasms From Recurring

Muscle cramps are a sudden contraction or tightening of a muscle that usually lasts a few seconds to a few minutes, caused by muscle twitches or spasms. Muscle spasms are involuntary, painful contractions of either an entire muscle group, an individual muscle, or some muscle fibers. [1]

The cramp last from a few seconds to minutes. 

Muscle spasms may affect the back, arms, legs, and eyelids.

It is important to note that a painful cramp in a specific area or body part does not mean that the cause of the cramp is local; in fact, it is often not local but rather involves the whole body. 

The brain sends excess electrical signals to your muscles, involuntarily contracting them. 

The cause for muscle cramps is often tied or can be a sign of other medical issues if they occur regularly and are a persistent issue. These medical conditions include Alzheimer’s disease, Amyotrophic Lateral Sclerosis (ALS), cirrhosis, cramp-fasciculation Syndrome, Creutzfeldt-Jakob disease, diabetes, epilepsy, Fibromyalgia, Gaucher disease, Head or spinal cord injuries, Huntington’s disease, Isaac’s syndrome, kidney failure, liver failure, Lou Gehrig’s disease, multiple sclerosis, neuropathy, Parkinson’s disease, serotonin toxicity, spinal muscular atrophy, or as a side effect of medications including corticosteroids. [1-2]

However, minor muscle cramps are usually a result of lifestyle-related problems, which we will talk about now. 

Hiccups and body jerks before sleeping are also examples of muscle cramps.

Lifestyle-related muscle cramps are often due to an imbalance or lack of the essential nutrients to create a muscular contraction. Let’s look at what can be done:

1. Pregnancy

About 50% of pregnant women experience muscle cramps, particularly in the last trimester during the night. [3]

This could be caused by excessive weight gain, nerve compression, or increased effort on the muscles of the lower limbs, but it is often from nutrient deficiency. There is a heightened need for the fetus to receive nutrients. If these are lacking from the mother’s diet, the mother’s muscles may cramp due to a deficiency in nutrients needed for proper electrical stimulation of muscles. Electrolytes and magnesium are often lacking. [4]

2. Exercise

During exercise muscular cramps are a symptom during or after vigorous exercise. Rigorous physical activity could build up lactic acid in the muscles and cause muscle cramps. Dehydration’s another cause that may lead to electrolyte imbalance during exercise and nutrient deficiencies that worsen with vigorous exercise. 

Muscle cramps associated with exercise are the most common condition demanding medical attention during sports. [5-6]

3. Night-time or nocturnal leg cramps

These cramps affect about 37% of people in the US over the age of 60. The most affected muscle area is the legs. These cramps may be due to certain deficiencies and often reduce sleep quality and quality of life. [7-8]

4. Eye twitches

These twitches can be caused by stress, smoking, wind, excess caffeine intake, lack of sleep, nutrient deficiencies, especially vitamin B12 deficiency, or an underlying eye issue. [9-10]

Despite the “benign” nature of the spasms, many people who suffer from them find them very uncomfortable having an inverse relationship with their quality of life since they are linked to depression and sleep disorders if they occur regularly.

Here are natural ways to prevent and treat muscle spasms:

B vitamins, especially Vitamin B6 (Pyridoxine), folate (vitamin B9), and cobalamin (vitamin B12).

Vitamin B6 is an essential co-factor for many biochemical reactions in cellular metabolism. The deficiency of this vitamin results in impaired signaling between neurons and presents with muscular convulsions and hyperirritability. The lack of folate and B12 leads to neurological symptoms, including muscle cramps. 

Therefore, Pyridoxine, B12, and folate levels should be assessed in all people suffering from muscle cramps. [11-12]

Supplementing with the Vitamins through a B-complex supplement is easy and has no side effects. If you are pregnant, exercising regularly, or suffer from muscle spasms anywhere in the body, I recommend supplementing with a B-complex twice to three times a week in the mornings.

2. Potassium deficiency or hypokalemia is also a predictor of muscle cramps. [13-14]

Foods rich in potassium include avocado, bananas, beans, broccoli, green leafy vegetables, lentils, sweet potatoes, raisins, and squash. These foods are also anti-inflammatory which are the common medications prescribed for people with muscle spasms. 

Aim to consume sufficient foods with potassium daily to prevent a deficiency. However, potassium deficiency can also be caused by dehydration and not only malnutrition. Also, certain medications may lead to potassium deficiency. Potassium deficiency may also be the result of a medical condition mentioned above. Check with your doctor regarding any medicines you take if spasms are frequent.

3. Magnesium deficiency

Magnesium helps transfer calcium across the cell membrane to support your nerves and muscles. Magnesium plays a prominent role in healthy nerve functioning and protects against excessive excitation by balancing calcium levels. [15-18] Magnesium is found in spinach, oats, soy, seeds (pumpkin seeds, chia seeds), and nuts (almonds, cashews, and peanuts). I recommend consuming at least one of these mentioned foods daily. If you do not consume at least one of these foods daily or drink too much alcohol, you may have a magnesium deficiency. 

4. Extreme calcium deficiency

Calcium interacts with magnesium in the body. Signs of calcium deficiency or hypocalcemia include increased neuromuscular excitability. This is because the threshold needed for the activation of neurons is lowered when calcium is deficient. Neurons become unstable and fire spontaneously, and muscles twitch or spasm.

You can increase calcium consumption by consuming natural seeds, using seed spreads on bread, or eating soy products, leafy green vegetables, and nuts.

People with low magnesium need to correct it before treating calcium deficiency, as hypocalcemia will otherwise not be corrected. [19]

5. Excess caffeine

Many people who rigorously work out use caffeinated products to boost their performance. Since caffeinated products cause dehydration, too much caffeine can lead to muscle spasms. Caffeine also increases calcium flow into cells allowing increased contraction. [20-22]

6. Relaxation often helps.

Changing focus by going outdoors or going somewhere different helps move your mind away from the stress allowing you to relax, immediately stopping the twitch, hiccup, or spasm if they are related to stress. Enhance your sleep by going to bed, and waking up in the morning at similar times often prevents muscle spasms. Staying sufficiently hydrated and cutting back on coffee is also crucial. Different relaxation techniques, such as meditation, can be helpful if you can go somewhere quiet, which is not always possible. Moving around, walking, or running will reduce cortisol levels and stress.

7. Hydration

It is crucial to sufficiently hydrate in hot weather conditions and upon waking in the morning with clean water. Research has reported that 95% of reported muscle cramps occur in hot months, suggesting that these cramps are more severe than during other months. [23] 

Hydration is also essential in cold weather conditions since sodium and chloride, the two main electrolytes lost in sweat, are also lost in cold weather. I recommend drinking mineral water when exercising as this water naturally contains electrolytes and magnesium to prevent muscle spasms. Coconut water is also of great benefit. You may also add some salt to your water to reduce the occurrence of muscle cramps. [24-25]

To conclude

Muscle spasms may be very uncomfortable, reducing the quality of life and sleep. If not connected to any disease, sufficient hydration with mineral water, reduced consumption of caffeinated foods and drinks, and ensuring adequate nutrient intake through the diet and a B-complex, together with relaxation techniques, will help prevent and manage any episode of muscle spasms, including cramps, eye twitches, and hiccups. 

Please feel free to share this article with friends you think may benefit from it.

Thank you for taking the time to read this. I’d be honored if you would share it with your family, friends, and followers by clicking the Like, Tweet, and Share buttons. If you are serious about improving your health no matter what your age or circumstances and are ready to finally achieve optimal health and lose the weight you’ve been struggling with, then click HERE to check out my online Guerrilla Diet Wholistic Lifestyle Bootcamp for Healthy and Lasting Weight Loss.

If you are not already on my mailing list, where you will receive my weekly articles packed with scientifically based health and nutrition content, as well as many FREE bonuses and special offers, and much more, then click HERE to subscribe.

Thank You, 🙂

Dr. Galit Goldfarb


  1. Bordoni B, Sugumar K, Varacallo M. Muscle Cramps. [Updated 2022 Feb 12]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2022 Jan-.
  2. Ibrahim W, Zafar N, Sharma S. Myoclonus. [Updated 2021 Aug 4]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2022 Jan-. 
  3. Valbø A, Bøhmer T. Leggkramper i svangerskapet–hvor hyppig forekommer det? [Leg cramps in pregnancy–how common are they?]. Tidsskr Nor Laegeforen. 1999 Apr 30;119(11):1589-90. Norwegian. PMID: 10385800.
  4. Young, Gavin, and David Jewell. “Interventions for leg cramps in pregnancy.” The Cochrane Database of Systematic Reviews vol. 2002,1 CD000121. 21 Jan. 2002, doi:10.1002/14651858.CD000121
  5. Schwellnus MP. Cause of exercise associated muscle cramps (EAMC)–altered neuromuscular control, dehydration or electrolyte depletion? Br J Sports Med. 2009 Jun;43(6):401-8.
  6. Giuriato G, Pedrinolla A, Schena F, Venturelli M. Muscle cramps: A comparison of the two-leading hypothesis. J Electromyogr Kinesiol. 2018 Aug;41:89-95
  7. Allen RE, Kirby KA. Nocturnal leg cramps. Am Fam Physician. 2012 Aug 15;86(4):350-5. PMID: 22963024
  8. Young G. Leg cramps. BMJ Clin Evid. 2015;2015:1113. Published 2015 May 13.
  9. Moshirfar, Majid et al. “Will Tonic Water Stop My Eyelid Twitching?.” Clinical ophthalmology (Auckland, N.Z.) vol. 14 689-691. 4 Mar. 2020, doi:10.2147/OPTH.S235895
  10. Jafer Chardoub AA, Patel BC. Eyelid Myokymia. [Updated 2021 Nov 2]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2022 Jan-.
  11. Zhou J, Effiong U. Isolated Pyridoxine Deficiency Presenting as Muscle Spasms in a Patient With Type 2 Diabetes: A Case Report and Literature Review. Am J Med Sci. 2021 Jun;361(6):791-794. doi: 10.1016/j.amjms.2020.10.027. Epub 2020 Oct 31. PMID: 33958192.
  12. Katzberg HD, Khan AH, So YT. 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. 2010 Feb 23;74(8):691-6. doi: 10.1212/WNL.0b013e3181d0ccca. PMID: 20177124.
  13. Weiker, Madelyn K et al. “Muscle Cramps Do Not Improve With Correction of Vitamin D Insufficiency.” WMJ : official publication of the State Medical Society of Wisconsin vol. 116,5 (2017): 200-204.
  14. Kardalas, Efstratios et al. “Hypokalemia: a clinical update.” Endocrine connections vol. 7,4 (2018): R135-R146. doi:10.1530/EC-18-0109
  15. Kirkland AE, Sarlo GL, Holton KF. The Role of Magnesium in Neurological Disorders. Nutrients. 2018 Jun 6;10(6):730. doi: 10.3390/nu10060730. PMID: 29882776; PMCID: PMC6024559.
  16. Pham PC, Pham PA, Pham SV, Pham PT, Pham PM, Pham PT. Hypomagnesemia: a clinical perspective. Int J Nephrol Renovasc Dis. 2014 Jun 9;7:219-30. doi: 10.2147/IJNRD.S42054. PMID: 24966690; PMCID: PMC4062555.
  17. Gragossian A, Bashir K, Friede R. Hypomagnesemia. [Updated 2021 Nov 8]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2022 Jan-. 
  18. Hallegraeff J, de Greef M, Krijnen W, van der Schans C. Criteria in diagnosing nocturnal leg cramps: a systematic review. BMC Fam Pract. 2017;18(1):29. Published 2017 Feb 28. doi:10.1186/s12875-017-0600-x
  19. Cooper, Mark S, and Neil J L Gittoes. “Diagnosis and management of hypocalcaemia.” BMJ (Clinical research ed.) vol. 336,7656 (2008): 1298-302. doi:10.1136/bmj.39582.589433.BE
  20. Molema MM, Dekker MC, Voermans NC, van Engelen BG, Aarnoutse RE. Caffeine and muscle cramps: a stimulating connection. Am J Med. 2007 Aug;120(8):e1-2. doi: 10.1016/j.amjmed.2006.07.035. PMID: 17679106.
  21. Caffeine and muscle cramps: a stimulating connection. The American Journal of Medicine. 2007;120:e1-e2
  22. Lopes J, Aubier J, Jardim J, Aranda J, Macklem P. Effect of caffeine on skeletal muscle function before and after fatigue. J Appl Physiol. 1983;54(5):1303-1305.
  23. Miller K., Stone M., Huxel K., Edwards J. Exercise-associated muscle cramps: causes, treatment, and prevention. Sports Health. 2010; 2(4): 279-283
  24. Poynter D, Thornton H. Heat cramps: treatment and prevention. Athletic Training and Sport Health Care. 2012;2:205-207
  25. Binkley H, Beckett J, Casa D, Kleiner D, Plummer P. National Athletic Trainers’ Association postion statement: exertional heat illness. J Athl Train. 2002;37:329-343.


Leave A Response

* Denotes Required Field