For general information only. This library does not replace advice, diagnosis or treatment from a qualified health professional. In an emergency, call 911.

Library / Conditions

Muscle spasm

A muscle spasm is a sudden, involuntary tightening of a muscle or group of muscles, which can be brief and harmless or a sign of another health problem.

Clinician view: includes diagnostic criteria, management and safety detail.

Overview

A muscle spasm is when a muscle, or a group of muscles, tightens (contracts) on its own, without you choosing to move it. The medical term is simply spasm. Some spasms last only a second or two, like a twitch. Others last several minutes and can be very painful. A painful spasm in the calf or foot is often called a cramp or a "charley horse."

Spasms can happen in two kinds of muscle:

  • Skeletal muscles are the muscles you use to move your body, such as those in your legs, back, neck and face. Most spasms people notice happen here.
  • Smooth muscles line the inside of hollow organs, such as the stomach, bowel, bladder and blood vessels. Spasms in these muscles can cause cramping belly pain or other symptoms, depending on the organ.

Most muscle spasms are harmless and go away on their own or with simple self-care. Sometimes, though, spasms that keep coming back, spread, or come with other symptoms can be a sign of a nerve, muscle or other medical condition that needs checking.

Symptoms

What a spasm feels like depends on where it happens and how strong it is. Common signs include:

  • A sudden, sharp pain or tightness in a muscle
  • A hard lump or knot you can feel or see under the skin
  • Twitching or jumping of the muscle
  • Not being able to move a joint fully while the spasm lasts, such as a stiff neck or a toe that curls
  • Soreness or tenderness for hours or a day after a strong cramp

Spasms in different parts of the body

  • Legs and feet: calf and foot cramps are very common, often at night.
  • Back and neck: spasms often happen with a strain and can make it hard to bend, turn or stand up straight.
  • Face: twitching of the eyelid is common and usually harmless. Hemifacial spasm is a condition where muscles on one side of the face twitch or pull again and again.
  • Jaw: trismus is a spasm or tightness of the chewing muscles that makes it hard to open your mouth.
  • Belly: spasms of the bowel can cause cramping pain that comes and goes, often with bloating, diarrhea or constipation.

Causes

Often there is no single clear cause. Common triggers include:

  • Overuse or strain: exercising hard, lifting something heavy, or holding one position for a long time
  • Tired muscles: cramps are more likely near the end of long activity
  • Dehydration or heavy sweating, especially in hot weather
  • Low levels of minerals in the blood, such as potassium, calcium or magnesium
  • Injury to a muscle, joint or the spine, where nearby muscles tighten to protect the area
  • Stress, caffeine or lack of sleep, which can bring on twitching, such as an eyelid twitch
  • Pregnancy, which often brings leg cramps

Medical conditions linked to spasms

  • Nerve problems, such as a pinched nerve in the back or neck, or nerve damage from diabetes (peripheral neuropathy)
  • Brain and spinal cord conditions, such as stroke, multiple sclerosis, spinal cord injury or cerebral palsy, which can cause spasticity (stiff, tight muscles) and spasms
  • Kidney disease, thyroid problems and liver disease
  • A blood vessel pressing on a facial nerve, which is the usual cause of hemifacial spasm
  • Gut conditions such as irritable bowel syndrome, which can cause bowel spasms
  • Rarely, serious infections such as tetanus, which causes severe muscle spasms including lockjaw

Medicines

Some medicines can make cramps more likely as a side effect. Examples include some diuretics (water pills) and some cholesterol medicines called statins. If you think a medicine is causing cramps, talk to your doctor or pharmacist. Do not stop a prescribed medicine on your own.

Risk factors

Anyone can get a muscle spasm, but they are more common if you:

  • Are an older adult, since muscle mass and nerve health change with age
  • Exercise hard, especially in heat or without warming up
  • Are pregnant
  • Have diabetes, kidney disease, thyroid disease or a nerve condition
  • Take certain medicines, such as some diuretics
  • Sit or stand in one position for long periods

Diagnosis

Most people with an occasional cramp do not need tests. If your spasms are frequent, severe or come with other symptoms, your doctor will ask about:

  • Where and when the spasms happen, and how long they last
  • Your activity, fluid intake and any recent injury
  • Other symptoms, such as weakness, numbness, tingling or changes in bladder or bowel control
  • Your medical conditions and all medicines and supplements you take

They will examine your muscles, reflexes, strength and feeling. Depending on what they find, tests may include:

  • Blood tests to check minerals, kidney and thyroid function, blood sugar and muscle enzymes
  • Imaging, such as an X-ray or MRI scan, if a back or neck problem or a brain condition is suspected. An MRI can also look for a blood vessel pressing on a facial nerve.
  • Nerve and muscle tests, such as an EMG (electromyography), which records the electrical activity of muscles

Treatment

Treatment depends on the cause. For most everyday spasms, simple steps work best.

During a spasm

  • Stretch gently. For a calf cramp, straighten your leg and pull your toes up toward your shin, or stand and lean into a wall with the heel down.
  • Massage the tight muscle.
  • Walk around or shake out the leg.
  • Use heat to relax a tight muscle, or cold to ease soreness afterward.

Medicines

  • Pain relievers such as acetaminophen or ibuprofen can ease soreness after a spasm or with a back strain.
  • Muscle relaxants, such as cyclobenzaprine, methocarbamol, metaxalone, chlorzoxazone, orphenadrine and tizanidine, are sometimes prescribed for a short time for painful back or neck spasms. They can cause drowsiness and dizziness, so you should not drive or drink alcohol while taking them. Carisoprodol is used less often because it can be habit-forming.
  • Baclofen and tizanidine are used to ease spasticity and spasms caused by conditions such as multiple sclerosis or spinal cord injury. Baclofen should not be stopped suddenly, because this can cause serious withdrawal effects; your care team will tell you how to lower the dose safely.
  • Botulinum toxin injections can relax overactive muscles. They are the main treatment for hemifacial spasm and are also used for some types of spasticity.
  • Antispasmodic medicines, such as hyoscyamine, relax the smooth muscle of the gut and may help with bowel or bladder spasms.

Quinine was once used for night leg cramps, but it is generally no longer recommended for this because of the risk of serious side effects, including blood and heart problems.

Other treatments

  • Physiotherapy (physical therapy) can teach stretches and exercises, and help with posture and strength.
  • Treating the cause, such as correcting a low mineral level, managing diabetes or adjusting a medicine with your doctor.
  • Surgery is rarely needed. For some people with hemifacial spasm, an operation to move the blood vessel off the nerve may be an option.

Living with muscle spasms

If you get spasms often, these habits may help:

  • Drink enough fluids through the day, especially when exercising or in hot weather.
  • Warm up before exercise and stretch afterward.
  • Stretch your calves and hamstrings before bed if you get night cramps.
  • Increase exercise slowly rather than all at once.
  • Take breaks to move if you sit or stand for long periods.
  • Wear comfortable, supportive shoes.
  • Keep bed covers loose over your feet so your toes are not pointed down all night.
  • Limit caffeine and get enough sleep if you have twitching.

Check with your doctor or pharmacist before taking supplements such as magnesium for cramps. The evidence that they help most people is limited, and they are not safe for everyone, such as people with kidney disease.

Complications

Most spasms cause no lasting harm. Possible problems include:

  • Muscle soreness for a day or two after a strong cramp
  • Poor sleep from frequent night cramps
  • Falls, if a sudden cramp happens while walking or climbing
  • Ongoing pain and stiff joints when spasticity is not well controlled
  • Missing a more serious underlying condition, if worrying symptoms are ignored

Outlook

For most people, muscle spasms are short-lived and easy to manage at home. Spasms from a strain usually settle within days to a few weeks as the injury heals. When spasms are caused by another condition, the outlook depends on that condition, but treatment can often reduce how often and how strongly they happen.

Prevention

You cannot prevent every spasm, but you can lower your chances by staying active, stretching regularly, drinking enough fluids, building up exercise gradually and using good posture and lifting technique. Keeping long-term conditions such as diabetes well managed also helps protect your nerves and muscles.

In Canada

In Canada, physiotherapy may be partly covered by provincial plans in some situations, or by private insurance. Health Canada has warned that quinine should not be used to treat leg cramps.

Assessment

Spasm is an involuntary contraction of skeletal or smooth muscle. Distinguish exercise-associated and nocturnal cramps (benign, self-limited, palpable contraction relieved by stretch) from fasciculations, myotonia, dystonia, spasticity (velocity-dependent tone with upper motor neuron signs), tetany and seizures. Focal facial spasm suggests blepharospasm or hemifacial spasm; trismus suggests local dental, infective or neoplastic causes, drug-induced dystonia or tetanus.

Review medications (diuretics, statins, beta-agonists, antipsychotics, metoclopramide), hydration, pregnancy and comorbidities. Consider electrolytes (potassium, calcium, magnesium), creatinine, glucose, TSH and CK. EMG/nerve conduction studies for suspected neuropathy, motor neuron disease or myopathy; MRI brain or spine when upper motor neuron signs or radiculopathy are present; MRI with vascular sequences for hemifacial spasm.

Management

Benign cramps: stretching, hydration, treatment of reversible causes. Quinine is not recommended for routine nocturnal leg cramps (NICE CKS; Health Canada and FDA safety warnings regarding serious haematological reactions). Evidence for magnesium in idiopathic cramps is weak.

Acute low back or neck pain with spasm: NSAIDs and activity; skeletal muscle relaxants (cyclobenzaprine, methocarbamol, metaxalone, tizanidine, orphenadrine, chlorzoxazone) have modest short-term benefit and cause sedation (ACP 2017 low back pain guideline); limit to short courses. Avoid carisoprodol where possible (meprobamate metabolite, misuse and withdrawal risk). Carisoprodol, chlorzoxazone, cyclobenzaprine, metaxalone, methocarbamol and orphenadrine are listed as potentially inappropriate in older adults (AGS Beers Criteria). Chlorzoxazone carries a hepatotoxicity warning; tizanidine causes hypotension and hepatotoxicity and interacts with CYP1A2 inhibitors (contraindicated with fluvoxamine and ciprofloxacin).

Spasticity: baclofen, tizanidine, botulinum toxin for focal problems, plus physiotherapy. Do not stop baclofen abruptly (withdrawal can cause seizures, hallucinations and rebound spasticity; intrathecal withdrawal can be life-threatening). Hemifacial spasm: botulinum toxin injection is first-line; microvascular decompression for selected patients. Smooth-muscle spasm (e.g. IBS): antispasmodics such as hyoscyamine; watch for anticholinergic effects.

Red flags

  • Trismus or generalized spasms after a wound: consider tetanus
  • Tetany with paraesthesia: check calcium and magnesium
  • Weakness, wasting and widespread fasciculations: consider motor neuron disease
  • Myalgia with dark urine or very high CK: rhabdomyolysis
  • Back spasm with saddle anaesthesia or sphincter dysfunction: cauda equina syndrome
  • Hyperthermia and rigidity on antipsychotics or serotonergic drugs: neuroleptic malignant or serotonin syndrome

Prognosis of benign cramps and strain-related spasm is excellent.

When to get medical help

See a doctor if:

  • Your spasms happen often, are very painful or do not get better with self-care
  • Spasms come with muscle weakness, numbness or tingling
  • Muscles look smaller (wasting) or twitch all the time
  • Spasms spread to other parts of your body
  • Spasms started after beginning a new medicine
  • Your face twitches on one side and it does not go away
  • You have leg swelling, redness or warmth along with pain

Go to emergency or call emergency services if:

  • You have severe, widespread spasms, or your jaw locks and you cannot open your mouth, especially after a wound
  • You have spasms with trouble breathing or swallowing
  • You have sudden weakness or numbness of the face, arm or leg, trouble speaking, or confusion
  • Back spasm comes with loss of bladder or bowel control, or numbness in the groin area
  • You have severe muscle pain with dark (cola-coloured) urine
  • You have chest pain, or severe belly pain that does not ease

In an emergency, call 911.

References

  1. U.S. National Library of Medicine. MeSH: Spasm. meshb.nlm.nih.gov
  2. MedlinePlus: Muscle Cramps. medlineplus.gov/musclecramps.html
  3. NHS: Leg cramps. nhs.uk/conditions/leg-cramps/
  4. NINDS: Hemifacial Spasm. ninds.nih.gov/health-information/disorders/hemifacial-spasm