Pain Management

Leg cramps

This page was reviewed under our medical and editorial policy by

Eric D. Mecusker, DO, Assoc. Program Director, ACGME Fellowship in Hospice and Palliative Medicine, City of Hope | Duarte Department of Supportive Care Medicine

This page was reviewed on June 1, 2023.

You may have had leg cramps and muscle spasms before cancer, such as after intense exercise or when you weren’t hydrated enough. But for some cancer patients, what once was an occasional annoyance may become a constant issue. Persistent cramping of the leg and other muscles is a common side effect of cancer and cancer treatment, especially at night, which may affect sleep.

A muscle cramp or spasm is a painful tightening of a muscle. It may be sudden, and the muscle may feel tight or stiff. It may make it hard to move the muscle, but it usually lasts only a few minutes.

It’s most common in the leg—thigh, calf, ankle or foot—but may happen in any muscle, including in the hands, arms, abdomen and along the rib cage. Healthy people have plenty of muscle cramps, usually due to straining or overusing a muscle. However, certain factors may increase the likelihood, including older age, pregnancy, being overweight and being an athlete.

Some conditions and treatments associated with cancer may worsen leg cramps. These include:

More generally, everyday causes of leg cramps may be exacerbated by cancer, cancer-related conditions or cancer treatment. General factors that may lead to more leg cramps include:

  • Inactivity (such as staying in bed)
  • Overuse of muscles
  • Dehydration
  • Changing levels of minerals (electrolytes) in the blood, including phosphate, calcium or potassium
  • Temperature changes
  • Pinched nerve or spinal cord injury that compresses the nerves
  • Lack of blood to the muscles
  • Pregnancy
  • Dialysis

10 tips to help deal with and prevent leg cramps

  1. Make sure you’re well-hydrated. Your care team should help you correct any dehydration or electrolyte imbalance, which may include supplements.
  2. With your doctor’s permission, try applying heat or cold to the cramping muscle. Get details about what type of heat and cold and how long to apply it.
  3. Keep warm—cold temperatures and shivering may bring on cramps.
  4. Change positions often, even if you’re in bed. Exercise your legs in bed by bending and straightening them.
  5. If you’re in bed, consider raising the blanket off your feet and legs with a bed cradle.
  6. Stretch gently before lying down.
  7. When you feel a cramp coming on, stretch against it as much as possible without hurting. For example, point your toes toward your knees for a calf cramp.
  8. Ask your care team about massaging the cramps.
  9. If your muscle cramps are severe or frequent, your doctor may prescribe a temporary muscle relaxant or a prescription pain medication.
  10. Keep a diary or log of your symptoms, including the time of day, which activities you were doing and what helped to make the cramping go away. This information may be helpful for your care team in finding the cause of the cramps and to help them recommend an appropriate medication.

What to watch out for

There are a few things to watch out for, as these may be signs of other health issues. These include:

  • Swelling, warmth, tenderness or redness around the cramping muscle
  • Chest, back, arm, shoulder or jaw pain
  • Sudden coughing and/or shortness of breath
  • Increased heart rate
  • Lightheadedness
  • Cramps that won’t go away after cold, massaging or stretching
  • Cramps lasting for longer than six hours
  • Cramps that come with, or lead to, muscle weakness

If any of these things happen to you or a loved one, call the doctor. If symptoms combine—such as you’re feeling lightheaded, have a racing heart rate, coughing and pain in the chest, back, arm, shoulder or jaw—go to the emergency room right away.