Tips on Preventing Leg Cramps while Sleeping

A few days ago, I woke up in the middle of the night with a massive leg cramp on my left calf muscle or gastrocnemius.  It was extremely painful and my first reaction was to grab the area and squeeze it to prevent further pain and damage!  The severity of the pain in leg cramps varies from person to person or from athlete to athlete.

The pain lasted a few seconds but it sure felt like an hour.  Even after the contraction ended,  there was a distinct soreness in the muscle and was still tender to the touch for the next 24 hours.  I considered icing afterwards like most athletic injuries.

Some people recommend standing up and putting pressure when you have a nighttime leg cramp.  I assume the suggestion is to lengthen the muscle.  Sorry, but if you were already asleep, well, standing up is hard enough as it is.

This article will focus on nocturnal leg cramps or idiopathic leg cramps, which is not to be confused with restless legs syndrome.   With restless legs syndrome, you get tingling sensations in the legs and just walking around is the best relief.  You can see this live when you have a roommate, hotel-mate or spouse and witness this unusual kicking or twitching in bed.

Who Gets Leg Cramps?

People of all ages gets leg cramps but it seems to be directed at older people.  Then again, older people complain more, right?

As well, athletes, pregnant women, and sedentary people are prone to cramps.  Thus it appears that cramps occurs in people who exert too much, or not at all.  A bit unusual on the “bell curve” if you ask me.

How Do You Get Leg Cramps?  Theories

When you are asleep and your foot is in a non-dorsiflexed position, which is a shortened position for the calf muscle, then somehow your muscle gets the stimulation to contract.  This contraction is the cramp.

So with your knees slightly bent and feet pointing slightly downwards, this position is supposedly conducive to leg cramps.

To explain why athletes gets leg cramps could be attributed to the muscle over exertion and an imbalance in sodium or potassium levels at the cellular level.  No one is sure.

As well, It is possible leg cramps can be caused by a voluntary contraction.

Solutions and Preventative Remedies

    1. Accupressure, Accupuncture and Reflexology deserves a separate series of articles. But the term “keep a stiff upper lip” has some merit here as pinching your upper lip while enduring leg cramps can help minimize the pain until the pain stops.


    1. For Plantar Fasciitis, I recommend using a soft boot or night splint.  So if you know the shorten calf muscle can cause cramps, then this device may help, especially if you have tight calves or Achilles.  Basically it means sleeping in a non-dorsiflexed position.


    1. A change in your sleeping posture can also prevent leg cramps.  If you are lying on your back, keep a pillow under your calf.  If you are over 6 feet tall like Usain Bolt, Martyn Rooney or David Rudisha, then allowing the feet to hangover the edge of the bed is another way to relax that muscle and avoid leg cramps at night while sleeping.   If you aren’t over 6 feet tall, then simply slide down the bed.


    1. Stretching exercises before bedtime for the calf or Achilles is another good option that helps you in more ways than just preventing leg cramps.  You can even consider massage or a sprinter stick before bedtime.


    1. Dehydration or electrolyte imbalance could be a cause of cramps.  See my previous article on Pedialyte.  So make sure you are properly hydrated even if it means waking up in the middle of the night to urinate.


  1. Quinine is the last resort which has been reported as beneficial.  CAUTION: expecting mothers and females trying to get pregnant should consult their physician before take Quinine.

Jimson Lee

Jimson Lee

Coach & Founder at
I am a Masters Athlete and Coach currently based in London UK. My other projects include the Bud Winter Foundation, writer for the IAAF New Studies in Athletics Journal (NSA) and a member of the Track & Field Writers of America.
Jimson Lee
Jimson Lee
Jimson Lee
  • Regarding leg cramps, they can be completely avoided with 250 to 400 mgs of organic magnesium before bed. The magnesium controls the “calcium pumps” that cause contraction and it release. Also, the body has twice as much potassium as it does magnesium in each cell. The magnesium controls the potassium’s function as well as about 64 other bodily functions. Try it, you will like it.