Leg Cramps at Night: Causes and Treatments

Medically reviewed by
 Dr. Nayantara Santhi

Dr. Nayantara Santhi

Dr. Nayantara Santhi holds an academic position at Northumbria University. After completing her Ph.D. at Northeastern University (Boston, MA), she joined the Division of Sleep Medicine at Harvard Medical School as a post-doctoral fellow to research how sleep and circadian rhythmicity influence our cognitive functioning.

Read more
Last Updated On April 12th, 2024
Leg Cramps at Night: Causes and Treatments

Key Takeaways

  • What Are Nighttime Leg Cramps: Nocturnal leg cramps are a common condition that affects around 60% of adults, characterized by painful, tightening sensations in the calf muscles or other parts of the legs during sleep. These cramps can disrupt sleep and cause discomfort.
  • Causes of Nighttime Leg Cramps: The exact cause of nocturnal leg cramps is not fully understood, but they can be associated with factors such as muscle fatigue, nerve damage, age (particularly in those over 50), pregnancy, and certain medical conditions like heart disease, diabetes, and kidney disease. Some medications may also contribute to leg cramps.
  • Treating Nighttime Leg Cramps: Treatment options for nocturnal leg cramps include stretching exercises, over-the-counter pain medications, prescription medications (like muscle relaxants), supplements (such as magnesium or B-12), and heat or cold therapy. Prevention strategies include staying hydrated, light exercises before bedtime, maintaining proper sleep positions, and using heat or cold therapy as needed.

Leg cramps can be caused by many different factors and can even happen as a side effect of certain medications or diseases. However, most of the time it can be difficult to pinpoint why nocturnal leg cramps are occurring. Medical professionals believe late night leg cramping may be brought on by muscle fatigue or issues in the nervous system, but an exact cause is still unknown.

Approximately 60% of adults Verified Source National Library of Medicine (NIH) World’s largest medical library, making biomedical data and information more accessible. View source  have reported experiencing nocturnal leg cramps — a painful, tightening sensation that occurs around the calf muscles at night. Night leg cramping can wake you from your rest, prevent you from falling asleep, and overall disrupt the quality of sleep you receive each night.

Save $450 On Any Mattress

Plus free shipping

Get $450 OFF Mattresses

The good news is, it is possible to treat the symptoms of leg cramps and, in some cases, reduce and even prevent these late night disturbances. We’ll walk you through everything you need to know about nocturnal leg cramps and offer tips on how to improve your quality of life if you suffer from this nighttime disorder.

What Are Nocturnal Leg Camps?

Nocturnal leg cramps refer to a painful, aching, or tightening feeling many adults experience in or around their calves at night. Although calves are the primary target of nocturnal leg cramps, some may also experience cramping in the foot or the thighs. Leg cramps are also referred to as charley horses or muscle spasms.

This type of sleep disturbance is usually categorized by the tightening of the leg muscle, which can occur on and off for hours at a time. The muscle contracts and becomes difficult to relax, leading to aches and pain. The severity of the pain varies from person to person.

What Causes Leg Cramps at Night?

Doctors do not know exactly what causes nocturnal leg cramps, though nerve damage and muscle fatigue are two possible culprits. Most people won’t experience nighttime leg cramps due to other medical conditions, but some may.

Risk of nocturnal leg cramps in the thigh, calf, or foot increase with age, particularly for those over 50. Pregnancy can also increase your risk of experiencing leg cramping at night. Other conditions associated with leg cramps include:

  • Heart disease
  • Nerve conditions
  • Cancer
  • Kidney disease or failure
  • Liver disease
  • Diabetes

Some medications can also lead Verified Source Mayo Clinic Ranked #1 hospital by U.S. News & World Report and one of the most trusted medical institutions in the world. The staff is committed to integrated patient care, education, and research. View source  to night time leg cramps, though the probability is low. Medications sometimes associated with this condition include:

  • Birth control and other oral contraceptives
  • Statins (for lowering cholesterol)
  • Blood pressure medications
  • Diuretics
  • Dialysis

According to the Cleveland Clinic, the full list of medications Verified Source Cleveland Clinic Ranked #2 hospital by U.S. News & World Report and one of the largest academic medical centers in America. The Cleveland Clinic serves patients from all over the world. View source that may be associated with nocturnal leg cramps includes: albuterol/ipratropium (Combivent®), amoxicillin, bromocriptine (Parlodel), bupropion (Wellbutrin), celecoxib (Celebrex®), cetirizine (Zyrtec), chromium, cinacalcet (Sensipar), ciprofloxacin (Cipro), citalopram (Celexa), conjugated estrogens, clonazepam (Klonopin®), donepezil (Aricept), diuretics, eszopiclone (Lunesta), fluoxetine (Prozac), gabapentin (Neurontin®), IV iron sucrose, lansoprazole (Prevacid), levalbuterol, levothyroxine, metformin, naproxen (Naprosyn®), niconitis acid, nifedipine, pregabalin (Lyrica®), rivastigmine (Exelon), sertraline (Zoloft), statins, telmisartan (Micardis), teriparatide (Forteo®), teriparatide raloxifene (Evista®), and zolpidem (Ambien®).

Should You See a Doctor for Leg Cramps?

Nocturnal leg cramps, though disruptive and agitating, are generally not serious Verified Source Mayo Clinic Ranked #1 hospital by U.S. News & World Report and one of the most trusted medical institutions in the world. The staff is committed to integrated patient care, education, and research. View source  and don’t require visiting a doctor in most cases. However, you may want to see a doctor if your symptoms continuously disrupt your sleep or if you develop other side effects.

If you find it hard to function or stay awake throughout the day because nocturnal leg cramps keep you awake at night, you’ll want to talk to your doctor to discuss options to help you achieve better rest.

Some sufferers of leg cramps may also experience muscle weakness. If your legs’ muscles are harder to control, you’ll want to visit a doctor to prevent the muscles from atrophying (shrinking or degenerating).

Diagnosing Leg Cramps at Night

In most instances, you’ll be able to detect nocturnal leg cramps yourself. If you notice tightness in one or both legs during the night that prevents you from sleeping or wakes you up, you’ll want to notify your doctor. It can be helpful to keep a record of your symptoms to discuss, as part of a sleep diary.

Your doctor will likely perform a physical exam, review your medical history, and may ask additional questions to rule out other disorders or problems. In some cases, blood tests may be required to ensure there are no other underlying issues. However, there’s no test your doctor can run to diagnose leg cramps.

(See also Does Lack of Sleep Affect My Blood Test Results?)

How to Treat Nocturnal Leg Cramps

Nocturnal leg cramps often go away on their own, but if you’re experiencing persistent or painful symptoms, there are different methods for treating nocturnal leg cramps, though there’s no cure for this ailment. The main issues with the main treatment methods — exercise and medications — is that there’s no one method that is both safe and effective.

In most cases, your doctor will instruct you to perform stretching exercises to reduce leg cramp symptoms and help you sleep through the night. For more severe leg cramps, medication may be prescribed.

Stretches to Treat Leg Cramps

Certain stretches and movements have been found to improve leg cramp symptoms and severity in some sufferers. Unfortunately, some patients experienced little to no improvement when utilizing stretching or exercising in their daily routines.

When leg cramps occur, stretching and other movements may be able to alleviate symptoms. For some, stretching tight muscles can lessen or eradicate nighttime leg cramps, but in others this treatment method is less effective. Stretching and exercising might work better for some as a preventative method (more on this below).

Medications to Treat Leg Cramps

There’s no single medication designed to treat leg cramps, though a variety of medications have been implemented and shown some improvement in symptoms in patients. Your doctor might prescribe:

  • Carisoprodol (Soma)
  • Diltiazem
  • Gabapentin,
  • Orphenadrine (Norflex)
  • Verapamil

All of which have been shown to help some leg cramp sufferers in small studies. It’s worth noting that pharmaceutical treatments for leg cramps are still being assessed, so your doctor may not prescribe medication until further research has been conducted.

If you are prescribed medication, it’s important to discuss the side effects of any drug with your doctor before deciding if it’s right for you.

Alternatively, over-the-counter pain medications such as ibuprofen or tylenol can be used to treat pain from muscle cramps. Just be aware that these medications can take some time to kick in and won’t help immediately.

Supplements for Leg Cramps

If you’re not sure if medication is right for you, there are a few supplements that have been connected to positive improvements in leg cramp sufferers. B-12, magnesium, sodium, and general multivitamins have all shown some degree of improvement in symptoms. Magnesium supplementation results have been mixed, while pregnant women have seen improvement using multivitamins and sodium supplements.

However, supplements also come with risks. For instance, sodium supplementation could lead to high blood pressure Verified Source Centers for Disease Control and Prevention (CDC) The United States’ health protection agency that defends against dangers to health and safety. View source or hypertension, Verified Source Centers for Disease Control and Prevention (CDC) The United States’ health protection agency that defends against dangers to health and safety. View source particularly for pregnant women.

Heat and Cold Therapy

When you’re suffering from nocturnal leg cramps, ice and cold compresses can help lessen pain of the ache. Be sure to always wrap ice and ice packs in a towel or other fabric to prevent the ice from sticking to your skin.

While heat is best at preventing nocturnal leg cramps, it can be used after icing the area to increase blood flow and help the muscle relax.

Ways to Prevent Late Night Leg Cramps

There are a few different strategies Verified Source Cleveland Clinic Ranked #2 hospital by U.S. News & World Report and one of the largest academic medical centers in America. The Cleveland Clinic serves patients from all over the world. View source you can employ to try preventing late night leg cramps. These include light exercise, stretching, hydrating, choosing the right sleep position, and applying hot and cold compresses.

Light Exercises to Try

Some evidence points to light physical exercise during the day as a means of reducing leg cramp symptoms at night. This might include jogging, running on a treadmill, or using an exercise bike or elliptical in the evenings before bed. Only a few minutes of exercise is often enough to warm up your leg muscles, in the hope of preventing cramping.

Dynamic Stretches for Leg Cramps

Stretching before bed could also help reduce your symptoms. The stretches you perform should target the area that aches during bouts of cramping.

For calves, something as simple as calf raises before bed could loosen up tightened muscles. Standing and holding your leg behind your (bent at the knee) can also loosen tight thigh muscles. Stretching your feet using stairs or running a tennis ball around tight muscles can help reduce cramping in your feet.

Here are a few other stretches to try to prevent leg cramps

Standing calf stretch

Stand facing a wall and place your hands against the wall in front of you. Bend your elbows at a 90 degree angle. Lower your body so that one knee is bent in front of you and the other is behind you, bent with the knee straight and your back heel firmly on the ground. Hold this pose for 15 – 30 seconds and then repeat on the other side.

Standing hamstring stretch

Place a chair against the wall (back of the chair to the wall) and lift one heel onto the chair, keeping your knee straight. Keep your other foot firmly on the ground, with your knee straight. You can lean forward slightly to deepen this stretch. Hold for 15 – 30 seconds and then repeat with the other leg.

Forward leaning stretch

Similar to stretch #1, stand and face a wall. With your feet firmly on the ground, lean forward and press your palms against the wall. Your body should be tilted forward slightly, with your head closer to the wall than your feet. Hold this stretch for 15 – 30 seconds and repeat as needed.

These stretches may also help when you’re experiencing leg cramps, but are most helpful when done prior to going to sleep.


It may seem like dehydration is blamed for just about every medical issue, but hydrating your body is important if you want your muscles to stay relaxed. Drinking 6-8 glasses of water per day is recommended, but if you exercise or are more active than most, you’ll want to increase this amount.

In addition, if you drink caffeine, you’ll want to increase your water intake. A good way to determine if you’re hydrating enough is by making sure your urine is clear.

Change Your Sleeping Position

If you’re worried your sleeping position may be to blame for tense muscles and leg cramps, there are a few tricks you can employ. First, you can use pillows to ensure your feet and legs are relaxed, particularly if you’re laying on your back. Raising your feet onto a pillow to ensure your toes aren’t tensing can be helpful. You may also find relief by using a wedge pillow to raise your knees.

If you sleep on your side, a knee pillow between your legs can help keep your spine aligned and body relaxed. For stomach sleepers, try scooting down a few inches until your feet hang off the bed. This will keep your body more relaxed and less likely to tense and cramp.

Apply Hot Compresses

After stretching, applying heat Verified Source Cleveland Clinic Ranked #2 hospital by U.S. News & World Report and one of the largest academic medical centers in America. The Cleveland Clinic serves patients from all over the world. View source to the areas that tend to cramp at night can help increase blood flow and relax your muscles. You could use a heating pad for 5 – 10 minutes on each spot or opt for a warm bath or shower to loosen your muscles. Applying heat right before bed is best, since you won’t be exerting your muscles as much while resting.

Frequently Asked Questions

How do I prevent leg cramps at night?

One way to avoid leg cramps is to give your legs a mild workout before bed. Try a few simple stretches or even a few minutes of light pedaling on an exercise bike. You may also need to sleep on your back with a pillow propping your knees up. Lastly, sleep with loose, light, and untucked bedding. Heavy bedding that is tucked in can place extra pressure on the legs.

During the day, try to drink plenty of liquids and use comfortable, supportive footwear. Proper hydration promotes good muscle function, while good footwear keeps your feet and legs in healthy condition.

What do leg cramps at night mean?

Leg cramps at night while you sleep can simply be a sign that you had an active day. For example, people whose jobs include standing on their feet all day may experience nocturnal leg cramps, particularly within the first few weeks of their job when they are still adjusting to the strain.

Can insomnia cause leg cramps?

Yes, nocturnal leg cramps are often associated with insomnia. Sleep deprivation can cause inflammation in the body, including the leg area, and this inflammation can produce cramping. The relationship between poor sleep and increased likelihood of pain is still being studied, but it’s difficult to deny the connection.

How do you stop leg cramps fast?

If you wake up to a leg cramp and want to get back to sleep, try kneading the affected area with your hands to loosen the muscle. You can stretch and straighten your leg or spend a few minutes walking on your heels to relax the cramping muscle, too.

You can also try light heat or cold therapy. Placing a warmed towel or a heating pad on the sore muscle can ease pain, as can a warm bath. Massaging the muscle with ice can also reduce pain.

When should I be concerned about leg cramps?

Infrequent muscle cramps typically vanish on their own and shouldn’t be considered a cause for concern. However, if you experience leg cramps at night regularly or they are so severe that you lose a significant amount of sleep and can’t function normally the next day, we recommend seeing a doctor.

You should also make an appointment if your leg cramps are accompanied by leg swelling, redness, other skin changes, and a loss or shrinkage of leg muscle or general muscle weakness. A doctor visit may also be prudent if your leg cramps lack an obvious cause, such as vigorous exercise.

Do Not Let Nocturnal Leg Cramps Ruin Your Sleep

Nocturnal leg cramps can be annoying at best and painful at worst. On top of the aching and tightening sensations that many experience with cramps, the disruptive sleep can lead to poor rest, which can impact your overall quality of life. And, this pesky disorder impacts over half of all adults at some point throughout their life.

Although the exact cause of leg cramping at night is not known, your doctor may be able to help you identify a cause based on your medical history and help construct a plan to reduce this nighttime ailment.

Alternatively, simply moving your body more often, stretching at night, using hot and cold compresses, and drinking enough water before bed can help prevent and treat late-night leg cramps.

About the author

Courtney Johnston is a seasoned freelance writer and editor with over 10 years of experience in publishing digital content. Her areas of expertise include personal finance, small business, and health and wellness. With her work published in reputable outlets such as The Chicago Tribune, MSN, AOL, The Motley Fool, Benzinga, The Balance, Best Reviews, and The Culture Trip, Courtney brings a wealth of knowledge and a strong editorial background to her writing.

View all posts

Discover the ultimate sleep system

Choose your mattress

Shop top-rated mattresses with proven sleep-boosting materials.

Get a pillow

We have the perfect pillow to pair with your mattress.

Browse Pillows

Pick out bedding

Bring out the best in your mattress with our soft and breathable bedding.

Browse Bedding