Nighttime leg cramps are sudden, painful muscle contractions—often in the calf, foot, or thigh—that can wake you from sleep. They are common and are usually not a sign of a serious medical problem, but recurrent cramps can sometimes be linked to an underlying condition.
Here are some important points to know:
Common causes
- Muscle fatigue or overuse
- Sitting or standing for long periods
- Dehydration
- Pregnancy
- Certain medications (such as some diuretics or statins in some people)
- Medical conditions such as diabetes, nerve disorders, kidney disease, or poor circulation
What to do during a cramp
- Gently straighten your leg.
- Pull your toes toward your shin to stretch the calf.
- Massage the affected muscle.
- Walk around if you’re able.
- Apply heat (a warm towel or heating pad) to help the muscle relax.
Ways to reduce the chance of cramps
- Stay well hydrated.
- Stretch your calves and hamstrings before bed.
- Engage in regular, moderate physical activity.
- Wear supportive footwear if you spend long hours on your feet.
- Discuss your medications with your healthcare provider if cramps started after beginning a new medicine.
Should you take magnesium or other supplements?
Magnesium may help people who have a magnesium deficiency, but evidence that it prevents nighttime leg cramps in most adults is limited. It’s best not to start supplements unless advised by a healthcare professional, as unnecessary supplementation can have side effects or interact with medications.
When to seek medical advice
See a healthcare professional if:
- Cramps are frequent or severe.
- They are accompanied by muscle weakness, numbness, or swelling.
- One leg is persistently swollen, red, or warm.
- Cramps interfere with your sleep or daily activities despite self-care.
- You have underlying conditions such as kidney disease or diabetes and your symptoms are new or worsening.
Most nighttime leg cramps improve with stretching, hydration, and addressing any contributing factors. If they become persistent or are associated with other symptoms, a medical evaluation can help identify whether an underlying condition is contributing.
