Leg Cramps At Night What causes them and what to do to stop them
The Hearty Soul
The Hearty Soul
March 25, 2024 ·  6 min read

Why Your Legs Cramp At Night (And How to Fix It)

Written By: Dr. Hamid Tajbakhsh, ND

This article was originally published on December 3, 2015, and has since been updated.

Leg cramps are a symptom many people experience chronically, often at night. People may find relief from the cramping for a few evenings but notice that they return with a vengeance! Leg cramps are not only painful but can also disrupt the sleep we need to recover from the stress we experience throughout the day. This annoying problem can be due to many factors that need to be explored further. One common factor I see in practice is a lack of fluid and blood flow to the leg. Here are some avenues you may want to explore for avoiding leg cramps:

What Causes Leg Cramps?

Magnesium Deficiency: Magnesium is a mineral that is constantly used in many reactions throughout the body and therefore it’s no surprise that many of my patients suffer from a magnesium deficiency. Magnesium supplements have been proven to be valuable for alleviating leg cramps as it helps relax skeletal muscles. The video below summarizes the other symptoms of magnesium deficiency:

Diet is the best way of obtaining adequate magnesium and can be found in nuts and seeds such as brazil nuts, almonds, and flaxseeds. Should you want to try supplements, a typical effective dose is around 100mg two to three times a day depending on the severity of the deficiency. In severe cases, a side-effect of magnesium is loose stools or diarrhea, if this occurs it is strongly advised to stop the supplementation.

You may need to experiment with the dose to find the lowest effective amount, but I highly recommend sticking to nutritional sources for your magnesium intake. If you do prefer supplements, remember to seek individualized professional advice prior to taking them.

Vitamin D Deficiency: Calcium is another mineral that could be deficient in people experiencing leg cramps. If you are eating a balanced diet that includes a healthy portion of vegetables but still experience cramps, then vitamin D deficiency may be the culprit. Vitamin D allows for the absorption of calcium from your diet and if you do not have adequate vitamin D levels then the calcium is not absorbed properly. Vitamin D can be obtained by exposing your skin to sunlight but of course this isn’t always possible in the Winter months or in areas which are mostly cloudy like my city of Vancouver. Other vitamin D deficiency symptoms include:

A good alternative is eating mushrooms and seafood which can also provide you with vitamin D. Some people also opt to take supplemental vitamin D either in the form of drops or capsules. Supplemental vitamin D should be taken with a meal since it is a fat soluble vitamin and 1000IU per day is a good starting dose. But again, I would highly recommend you seek individualized advice.

How to Prevent Leg Cramps

In addition to supplementing appropriately for Vitamin D and magnesium, there are a few other simple practices that can help to ward off nightly leg cramps.

Stretching: You can help avoid leg cramps by incorporating simple stretches into your exercise routine which can help invigorate blood flow to your legs. One of the easiest stretches is to find a ledge and rest the ball of your foot on it while your heel is touching the floor. Next, slowly shift your weight towards the ledge like pressing the accelerator of your car. Maintain the position for only a few seconds and then rest for another few seconds. You should feel a good stretch in your leg muscles. Repeat this stretch 6-8 times on each foot. This exercise will stretch out your calves which is the part of the leg where most people experience cramps. Just note that the ledge should not be too high off the ground to avoid unnecessary pressure on the calves. You can easily create this ledge using books.

Hydration: Leg cramps can also be caused by insufficient intakes of fluids. It can also be due to a high intake of fiber-containing foods which use up our fluids. You should always monitor your water intake and try adding more fluids into your diet if you notice cramps are an ongoing issue. A couple of liters of water a day is a good goal to aim for depending on your fiber intake.

Acupuncture: In Chinese medicine, the evenings are Yin time and so the Yin substance, being blood, is often indicated in problems confined to night time. The tricky part here is that we are not talking about overt blood deficiency that may show up on a blood analysis. We are talking about a need to optimize blood circulation. Acupuncture can easily accomplish this and I have had great success with it. It opens up various channels through which blood can effectively flow to the legs. Having a few sessions of acupuncture from a qualified practitioner may help eliminate the cramps for good!

Massage: Along the same vein as acupuncture, massages can be used to stimulate blood flow and help circulation in tissues that are not adequately replenished. This is due to the squeezing and compressing actions of massage therapy which act like the beating of your heart in ensuring blood flow to the tissues. You can easily massage your legs by compressing your muscles using your thumbs and fingers. If you notice any points which are more tender than other areas then spend more time with your thumbs in these places. These areas of tenderness could represent trigger points and applying firm pressure on them, although temporarily painful, can help release the tension. Once released, you will notice that these once tender points are now softer and less painful. Massaging your muscles is also a great way of connecting with and showing kindness to your body.

Take-Home Message

The options above should help some people avoid nightly leg cramps. For others leg cramps can also be due to mental-emotional factors which you may need to explore further. One factor people can relate to is being stressed and overworked, which locks our bodies in a sympathetic mode. Our body complains when we don’t take the time to attend to it properly and leg cramps can definitely be a sign of this.

You should take some time at the end of the day to relax by breathing deeply for a couple of minutes and thinking of things that happened during the day which you are grateful for. This simple mental exercise often helps people de-stress which puts you in the parasympathetic mode needed for recovery and rejuvenation.

This awesome post was written by Dr. Hamid Tajbakhsh. He combines the latest in Western science and traditional Eastern philosophy to help patients achieve their health goals. You can check out his Facebook page here, or follow him on Twitter.


  1. Gaby, A. “Nutritional Medicine”, Fritz Perlberg, 2011.
  2. Hallegraeff, Joannes M., et al. “Stretching before sleep reduces the frequency and severity of nocturnal leg cramps in older adults: a randomised trial.” Journal of physiotherapy 58.1 (2012): 17-22.
  3. Sills, Sheila, et al. “Randomised, cross-over, placebo controlled trial of magnesium citrate in the treatment of chronic persistent leg cramps.” Medical Science Monitor 8.5 (2002): CR326-CR330.