Muscle Spasms

Medically Reviewed By William C. Lloyd III, MD, FACS
Was this helpful?

What are muscle spasms?

A muscle spasm is a painful, involuntary movement or contraction of a muscle. A muscle spasm is also known as a muscle cramp. Muscle spasms and cramps are not the same as muscle twitching, which refers to very fine involuntary movements (fasciculations) of a small segment of muscle.

Skeletal muscles are muscles attached to bones that you control to move your body. Normally your skeletal muscles create movement by voluntary contraction. This occurs when muscles respond to a message sent from the brain through the nerves, which causes the muscles to contract, then relax. Normal voluntary muscle contraction involves a series of steps and requires normal amounts of oxygen, electrolytes (such as potassium and calcium), and glucose, all of which are supplied by your blood. Problems with the brain and nervous system, as well as the other required elements, may result in muscle spasms.

Skeletal muscle spasms are common and most people experience a temporary skeletal muscle spasm at some point in their life. The skeletal muscles that most commonly contract involuntarily include:

  • Back of thigh (hamstrings)
  • Calf muscle (gastrocnemius)
  • Front of thigh (quadriceps)

Leg cramps, sometimes called charley horses, are sudden and uncontrollable muscle contractions or spasms. They can occur with exercise or while sleeping and usually resolve just as quickly as they came. The pain from muscle cramps can be intense, but can often be relieved with gentle stretching and massage.

Skeletal muscle spasms and cramps are usually caused by overuse of the muscle, either from exercise or a repetitive motion. Spasms can also occur if a muscle is overstretched or held in the same position for too long. The muscle essentially becomes hyperexcitable and fails to relax. In some cases, the muscle may need to be massaged in order to release the contraction. Muscle cramps are often caused by or worsened when you are dehydrated and not getting enough fluids.

Muscle spasms and cramps can also be caused by neuromuscular disorders, such as multiple sclerosis or a spinal cord injury. Movement disorders called dystonias also lead to forceful contractions. Dystonias can also be a complication of stroke. Certain medications can cause involuntary muscle contractions as well.

Other types of muscle spasms

Although we often think of skeletal muscle spasms or cramps, other kinds of muscle, such as smooth muscle, can spasm or cramp. Smooth muscles are found in the walls of hollow organs in your body, such as your stomach, bladder, and blood vessels, and play an important role in normal organ function. For example, the muscles in your esophagus, the hollow tube that connects your throat to your stomach, are vital to swallowing, but they can suddenly contract and spasm and cause severe pain in the chest.

Cardiac muscle, which makes up the heart and is responsible for pumping blood throughout your body, is another type of involuntary muscle. An immediately life-threatening condition called ventricular fibrillation is rapid, disorganized and ineffective contractions of heart muscle.

Muscle spasms and cramps can be a sign of a serious disease, disorder or condition, such as multiple sclerosis, spinal cord injury, or stroke. In addition, angina and heart attack may be caused by spasms of the coronary arteries that supply blood to the heart. Seek prompt medical care if your muscle spasms and cramps last for a long time, recur, or are causing you concern.

Seek immediate medical care (call 911) if you, or someone you are with, have chest pain, difficulty breathing or swallowing, progressive muscle weakness, change in consciousness, inability to move a body part, or stiff neck.

What other symptoms might occur with muscle spasms?

Muscle spasms may occur with other symptoms, which vary depending on the underlying disease, disorder or condition. For example, severe skeletal muscle spasms may be accompanied by bruising and swelling of the area. Muscle spasms that are caused by a disorder affecting your whole body, such as hypothyroidism, may be associated with weight gain, depression, and fatigue. Additional symptoms that may occur include:

Serious symptoms that might indicate a life-threatening condition

In some cases, skeletal muscle spasms may occur with other symptoms that might indicate a serious or life-threatening condition, such as acute dehydration or spinal cord trauma. Smooth muscle spasms in the arteries of the heart can cause angina or heart attack. Seek immediate medical care (call 911) if you, or someone you are with, have any of the following symptoms:

  • Absent or diminished pulse
  • Change in level of consciousness or alertness such as passing out
  • Change in mental status, such as confusion or disorientation
  • Chest pain radiating to the arm, shoulder, neck or jaw
  • Difficulty breathing, wheezing, or shortness of breath
  • Inability to move any part of your body
  • Irritability
  • Loss of vision
  • No urine output
  • Progressive weakness and numbness
  • Seizure
  • Stiff neck with a high fever

What causes muscle spasms?

Skeletal muscle spasms and cramps often occur when a muscle has been overused or overstretched. Muscle cramps can also be caused or worsened by dehydration and not getting enough fluids.

Muscle spasms and cramps can also be due to neuromuscular disorders and various diseases and conditions that affect the whole body, including diabetes, anemia, kidney failure, and thyroid disorders. In some cases, muscle spasms may be a symptom of a serious or life-threatening condition, such as a heart attack, tetanus (lockjaw), cancer, or severe dehydration.

Common causes of muscle spasms

Several common conditions that can cause muscle spasms and cramps include:

  • Dehydration

  • Holding your body or muscle in one position for a long time

  • Muscle strain

  • Overuse or repetitive motion

Neuromuscular diseases, disorders and conditions that can cause muscle spasms

A number of conditions that affect the muscles or nerves can produce muscle spasms. These include:

  • Amyotrophic lateral sclerosis (ALS, also known as Lou Gehrig’s disease; a severe neuromuscular disease that causes muscle weakness and disability)

  • Brain or spinal cord injury

  • Multiple sclerosis (disease that affects the brain and spinal cord)

  • Muscular dystrophy (inherited disorder that causes a progressive loss of muscle tissue and muscle weakness)

  • Myositis (muscle inflammation)

  • Parkinson’s disease (brain disorder that impairs movement and coordination)

  • Peripheral neuropathy (possible pelvic mass)

  • Pinched nerve (nerve compression)

  • Polio

  • Stroke

Causes of smooth muscle spasms

Smooth muscles are muscles located in the walls of hollow organs in your body, such as your stomach, bladder, and blood vessels. Causes or types of smooth muscle spasms include:

  • Raynaud’s disease and blood vessel spasms

  • Bladder infection and spasms of the bladder wall

  • Gallstones and colic

  • Esophageal spasms

  • Food poisoning and intestinal spasms

  • Kidney stone

  • Labor and childbirth

  • Menstruation

  • Prinzmetal’s angina (due to spasms in the arteries that supply the heart). Coronary artery spasms can lead to life-threatening cardiac arrhythmias (abnormal heart rhythms) and heart attack.

Other possible causes of muscle spasms

Muscle spasms and cramps can be caused by a variety of other diseases, disorders and conditions including:

  • Alcohol abuse and alcoholism

  • Heart attack

  • Hypothyroidism

  • Inherited metabolic disorders such as enzyme deficiencies

  • Kidney failure

  • Peripheral artery disease (PAD, also called peripheral vascular disease, or PVD, which is a narrowing of the arteries due to a buildup of fat and cholesterol on the artery walls, which limits blood flow to the extremities)

  • Potassium or calcium (electrolyte) imbalance

  • Pregnancy

  • Systemic lupus erythematosus (disorder in which the body attacks its own healthy cells and tissues)

  • Vitamin B12 or D deficiency

Medications and substances that can cause muscle spasms

Medications that can cause muscle spasms and cramps include:

  • ACE inhibitors for lowering blood pressure

  • Cocaine

  • Corticosteroids

  • Diuretics (“water pills”)

  • Estrogens

  • Statins for lowering cholesterol

  • Toxins such as nerve gas or insecticides

  • Zidovudine

Questions for diagnosing the cause of muscle spasms

To help diagnose the underlying cause of muscle spasms, your licensed health care provider will ask you several questions related to your symptoms. Giving complete answers to these questions will help your provider diagnose the cause of your muscle spasms:

  • Are you receiving hemodialysis?

  • What is your routine sleep posture?

  • Do you feel spasms in one particular muscle or in several different areas?

  • What body parts are affected?

  • How long have you had spasms? How long do the spasms last?

  • Are you experiencing any other symptoms at the same time, such as a sore throat or fever?

  • What makes your symptoms better or worse?

  • What other medications, if any, are you currently taking?

What are the potential complications of muscle spasms?

Complications associated with muscle spasms depend on the underlying disease, disorder or condition. For example, muscle spasms resulting from a degenerative condition, such as multiple sclerosis can lead to inactivity and its associated complications. Fortunately, most cases of muscle spasms can often be alleviated or minimized by physical therapy, basic self-help measures, and following the treatment plan outlined by your doctor.

With time, repetitive muscle spasms and their underlying cause can lead to complications including:

  • Chronic muscle spasms

  • Muscle contracture

  • Muscle pain

  • Permanent nerve damage (due to a pinched nerve) including paralysis

  • Physiological and psychological response to chronic muscle spasms

  • Poor quality of life

Was this helpful?
Medical Reviewer: William C. Lloyd III, MD, FACS
Last Review Date: 2020 Dec 31
View All Bones, Joints and Muscles Articles
THIS TOOL DOES NOT PROVIDE MEDICAL ADVICE. It is intended for informational purposes only. It is not a substitute for professional medical advice, diagnosis or treatment. Never ignore professional medical advice in seeking treatment because of something you have read on the site. If you think you may have a medical emergency, immediately call your doctor or dial 911.
  1. Muscle Cramps. Medline Plus, a service of the National Library of Medicine National Institutes of Health.
  2. Esophageal Spasm. Medline Plus, a service of the National Library of Medicine National Institutes of Health.
  3. Maquirriain J, Merello M. The athlete with muscular cramps: clinical approach. J Am Acad Orthop Surg 2007; 15:425