Muscle Cramps

Muscle cramps (also called muscle spasms or Charley horses) are sudden, sustained, involuntary contractions of a muscle or group of muscles. The cramping muscle becomes tight and hard and is invariably very painful. In fact, a muscle cramp is almost always painful enough to get you to stop doing whatever it is you were doing when it began.

Cramps can happen with any muscle, but most typically occur in the calf and foot muscles. Particularly common are leg or foot cramps that occur during the night, often during sleep — a symptom called nocturnal leg cramps.

Other muscles commonly prone to cramping include the thigh, hamstrings, muscles of the arms and hands, and rib and abdominal muscles. 

Muscle cramps are a pretty common event. Almost everyone, sooner or later, will experience muscle cramping.

muscle cramp
Jeannot Olivet / Getty Images

What Causes Muscle Cramps?

Electromyography (EMG) studies have shown that muscle cramps begin with increased activity in the nerves that supply the muscles, and not with the muscles themselves. It is now thought that muscle cramps represent a neural event and not a muscular event. 

But what causes the neural “twitches” that lead to a painful muscle contraction? It turns out that many things can produce muscle cramping. These include:

  • Biomechanical. Leg cramps can be associated with flat feet or other structural abnormalities of the legs and feet. Cramps are also more common in people who spend too much time sitting or standing on concrete flooring.
  • Neurological. Several neurological conditions can increase muscle cramping, especially Parkinson’s disease.
  • Dehydration. Dehydration from diuretics or excessive sweating may lead to muscle cramps.
  • Electrolyte disorders. -Low blood levels of potassium, calcium or magnesium are associated with muscle cramping.
  • Pregnancy. Muscle cramps are more common during pregnancy, possibly due to magnesium depletion.
  • Metabolic disorders. - Diabeteshypoglycemia, alcoholism, and thyroid disease are associated with muscle cramping.
  • Peripheral artery disease. Peripheral artery disease can cause leg cramping during exercise when the exercising muscles are not receiving sufficient blood flow. 
  • Dialysis. People on dialysis are extremely prone to muscle cramping, particularly during treatment.
  • Athletic activity. Prolonged or strenuous athletic activity, especially during hot, humid weather, can trigger muscle cramps. These are thought to be due to the dehydration and electrolyte disturbances that are common to this kind of activity. Acclimating to the heat, as well as staying well-hydrated (and sometimes, using electrolyte replacement) can help to prevent this type of muscle cramping.
  • Idiopathic. The large majority of muscle cramps cannot be attributed to any identifiable cause. When doctors don’t know the cause of a medical phenomenon, they say it is “idiopathic,” which sounds more sophisticated than saying, “I don’t know.” 

Nocturnal Leg Cramps

Nocturnal leg cramps are exceedingly common, and are quite painful. Doctors probably hear their patients complain about these cramps more than any other type

Nocturnal leg cramps are muscle cramps that occur while you are in bed (either awake or asleep), usually affecting the calf or foot muscles. They occur in every age group but are more frequent after the age of 50 . Their chief medical significance, in addition to the fact that they are painful, is that they disturb sleep, and may produce sleep deprivation if they are persistent. 

How to Treat Muscle Cramps

When you experience an acute muscle cramp, you can generally relieve it rapidly by stretching and massaging the affected muscle. Icing the muscle or an Epsom salt bath might also be helpful. If the cramp occurred during strenuous or prolonged exercise, it’s time to take a rest and get rehydrated. However, if you experience leg cramps regularly while walking or climbing stairs, you may have peripheral artery disease. In this case, you should definitely see your doctor for an evaluation.

If you have nocturnal leg cramps, regularly stretching your calf muscles may help prevent the episodes, as well as getting regular exercise. Wearing properly fitted shoes can also help. And loosening the bed covers at the foot of the bed (not tucking them in) can help prevent cramping. For an acute nighttime leg cramp, stretching and massaging the cramped muscle tends to work quickly to relieve the cramp.

If cramping is frequent or severe, or if nocturnal leg cramps are preventing sleep, you should consult with your doctor. Occasionally a course of treatment with medication (most commonly a calcium channel blocker or an antihistamine) can be helpful with nocturnal leg cramps.

A Word From Verywell

Muscle cramps are quite common — almost everyone will have a cramp once in a while. Most of the time there is no identifiable cause, or the cause is transient. However, muscle cramping can also be associated with various medical conditions that may require attention. If you have muscle cramps that are recurrent or are otherwise particularly disturbing, you should have a medical evaluation. 

Was this page helpful?
Article Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Young G. Leg cramps. BMJ Clin Evid. 2015;2015

  2. Jahic D, Begic E. Exercise-associated muscle cramp-doubts about the cause. Mater Sociomed. 2018;30(1):67-69. doi:10.5455/msm.2018.30.67-69

  3. Waters TR, Dick RB. Evidence of health risks associated with prolonged standing at work and intervention effectiveness. Rehabil Nurs. 2015;40(3):148-65. doi:10.1002/rnj.166

  4. Skogar O, Lokk J. Pain management in patients with Parkinson's disease: challenges and solutions. J Multidiscip Healthc. 2016;9:469-479. doi:10.2147/JMDH.S105857

  5. 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. doi: 10.1186/s12875-017-0600-x

  6. Mcdermott MM. Lower extremity manifestations of peripheral artery disease: the pathophysiologic and functional implications of leg ischemia. Circ Res. 2015;116(9):1540-50. doi:10.1161/CIRCRESAHA.114.303517

Additional Reading
  • Blyton F, Chuter V, Walter KE, Burns J. Non-drug Therapies For Lower Limb Muscle Cramps. Cochrane Database Syst Rev 2012; 1:CD008496.

  • Grandner MA, Winkelman JW. Nocturnal leg cramps: Prevalence And Associations With Demographics, Sleep Disturbance Symptoms, Medical Conditions, And Cardiometabolic Risk Factors. PLoS One 2017; 12:e0178465.

  • Allen RE, Kirby KA. Nocturnal Leg Cramps. Am Fam Physician 2012; 86:350
  • American Academy of Sleep Medicine. Sleep Related Leg Cramps. In: International Classification of Sleep Disorders, 3rd ed., American Academy of Sleep Medicine, Darien, IL 2014. p.299-303.
  • Maquirriain J, Merello M. The Athlete with Muscular Cramps: Clinical Approach. J Am Acad Orthop Surg 2007; 15:425.