Leg cramps at night are an unfortunately common ailment that can strike anyone for a variety of reasons. Pregnant women and the elderly are particularly susceptible, as are those who engage in particular sports activities or who take certain medications. Leg cramps are an unfortunately widespread phenomenon, but you should be able to eliminate nighttime leg cramps on your own. However, if chronic leg cramps are bothering you or if they do not resolve with some stretching and gentle massage, then see a doctor for help.

EditPerforming Stretches to Relieve Cramps

  1. Use a towel to stretch your calf muscles. Sit with your cramped leg out in front of you and wrap a towel around the ball of your foot. Grab both ends of the towel and pull it towards yourself so that you feel a stretch in the back of your leg. Hold this stretch for 30 seconds and repeat 3 times.[1]

    • This stretch works by compressing the leg and effectively massaging it.
    • Be careful not to overstretch and cause greater injury to your leg. Stop stretching if you start to feel pain in your calf.

  2. Lean forward in a sitting position to stretch your inner calf. In a sitting position, extend the leg that has the cramp in it and keep the other leg bent, then lean forward so that your knee approaches your chest. Take hold of the bottom of the toe from the extended leg and pull it toward your body as much as you can.[2]

    • If you’re unable to completely perform this stretch, simply lean forward and stretch your hands towards your toes as far as you comfortably can.

  3. Lean against a wall to stretch out your calf. Lean forward and place your hands on a wall, then take a step forward with your non-cramping leg and extend the other leg straight out behind you. Keeping the toes and heel of your extended leg flat on the ground, slowly transfer your weight onto your bent leg until you feel the stretch in your cramping calf. Hold this stretch for 15-30 seconds.[3]

    • You should repeat this stretch until the cramp in your calf dissipates.
    • You can also perform this stretch before you go to bed as a preventive measure to better ensure you don’t get leg cramps during the night.

  4. Lie down and lift your legs to stretch your hamstrings. Lie flat on your back and bend the knee in your non-cramping leg, so that your foot is flat on the floor. Then, extend and raise your cramping leg and pull it towards you while keeping it straight. Hold this stretch for 10-15 seconds.[4]

    • Make sure you pull your leg at the back of your thigh instead of at the knee to make sure you’re adequately stretching your hamstring.
    • If you can’t completely extend your cramped leg as you raise, simply extend it as far as you comfortably can and until you start to feel a stretch.

EditUsing Home Remedies to Treat and Prevent Leg Cramps

  1. Avoid sleeping in tight bedsheets. Tight bedsheets or covers can cause you to unconsciously point your toes downward while sleeping, which can trigger calf cramps. Stick with looser bedsheets to minimize the chance of your feet getting stuck in 1 position for too long and causing cramps.[5]

    • You can also avoid distorting your toes by hanging your feet over the end of the bed when you sleep so that your toes are pointing down.

  2. Apply a hot compress to the cramped area of your leg. Applying heat to the cramped area can do a lot to loosen tight muscles and relieve pain. Use an electric heating pad, a warm towel, or even a hot water bottle wrapped in cloth to relax your muscles and ease your cramps.[6]

    • If you choose to use an electric heating pad, be sure not to fall asleep while it’s on to avoid the risk of a fire starting. Make sure your heating pad has an automatic shutoff.
    • You might also be able to use heat to relax away your cramps by taking a hot bath or directing the stream of a hot shower onto your leg.
    • Make sure to check your leg for swelling before you do this. If your leg is swollen and you are also having pain and cramping, then you may have a blood clot, or deep vein thrombosis. In this case, seek medical attention and do not apply a heating pad.

  3. Make sure you’re wearing properly fitted shoes. Leg cramps can sometimes be caused by ill-fitting footwear, especially among people who have flat feet and other structural problems. To avoid leg cramps caused by footwear, be sure to only wear shoes that properly fit you and that are designed to compensate for any structural issues you have with your feet.[7]

    • You may need to get shoes specially fitted and made by a podiatrist. These will cost more than store-bought shoes, but they may help to stop your leg cramps. Sole inserts for shoes are unlikely to help.
    • People who suffer from nighttime leg cramps should also avoid wearing high heels, as these shoes have been linked to leg cramps.

EditChanging Your Diet

  1. Try drinking of tonic water if stretches don’t help. Tonic water contains quinine, which some people have reported as helpful for nighttime leg cramps. However, quinine is not FDA approved for treating leg cramps, and tonic water only contains a small amount.[8]

    • The very small amount of quinine in tonic water is unlikely to cause any side effects.

  2. Increase your intake of potassium, calcium, and magnesium. There’s some evidence that suggests nighttime leg cramps may be caused by nutrient deficiencies, especially low levels of potassium, calcium, and magnesium. This may be more of a problem for athletes. To avoid such deficiencies, make sure you are getting adequate amounts of these minerals from food or supplements.[9]

    • Good sources of these minerals may include milk, bananas, oranges, apricots, g****s, cabbage, broccoli, sweet potatoes, yogurt, and saltwater fish.
    • Be aware that the research on the causal connection between mineral deficiencies and leg cramps has been mixed, so increasing your consumption of these minerals may not by itself alleviate your night leg cramps. It is best to follow a balanced diet to get adequate amounts rather than to change your diet drastically.

  3. Ask your doctor about taking magnesium supplements if you’re pregnant. Pregnant women are generally more susceptible to having leg cramps, especially during the second and third trimesters. Talk to your doctor if you’re pregnant and experiencing leg cramps to determine whether taking magnesium supplements is right for you.[10]

    • Pregnant women are more likely to benefit from magnesium supplementation, which is critical to normal bodily function. For older or non-nursing adult women, studies show that magnesium supplements are far less conclusive.
    • Be sure not to begin to take any supplement without your doctor’s approval, especially if you are pregnant. Your doctor may determine that you can consume an adequate amount of magnesium simply by changing your diet.

  4. Consume at least of water a day to avoid dehydration. Night leg cramps can sometimes be the result of dehydration. Women should aim to drink about a day, while men should drink about of water a day.[11]

    • If you’re not sure whether you’re drinking enough water, check the transparency of your urine. Clear urine signals adequate hydration, while yellowish urine or urinating infrequently signals less adequate hydration.
    • Avoid drinking too much alcohol. Excessive alcohol consumption robs the body of water, making the possibility for cramping that much worse.

  5. Ask your doctor if you should take calcium channel blockers. Calcium channel blockers keep calcium from entering various cells and blood vessel walls in the body. Though they are primarily used to treat high blood pressure, they can also be used to help with nighttime muscle cramps. You will need to take your blood pressure regularly if you take this medication.[12]

    • If your doctor feels you should be on calcium channel blockers, they will give you a prescription along with specific dosage information.
    • The side effects of calcium channel blockers may include drowsiness, increased appetite, weight gain, and breathing difficulty (within the first few doses if you have an allergy to the medication).
    • Note that people taking calcium channel blockers should not eat g****fruit, drink g****fruit juice, or consume alcohol while on the medication.

EditAvoiding Drugs That May Cause Leg Cramps

  1. Watch out for diuretics. Diuretics that are used to treat high blood pressure may also help get rid of excess water in the body. This unfortunately can result in dehydration, a common cause of night leg cramps.[13]

    • If you take one of these drugs and experience leg cramps at night, talk to your doctor about taking a diuretic.

  2. Recognize that some hypertension drugs may cause leg cramps. Thiazide diuretics, used to treat high blood pressure and heart failure, may deplete key electrolytes in the body, paving the way for possible cramping. ACE-inhibitors may also cause an electrolyte imbalance and lead to muscle cramps.[14]

    • Talk to your doctor if you have an abnormal blood pressure reading while taking an anti-hypertensive medication. They may recommend changing the dose or taking you off of the medication.

  3. Consider swapping out statins and fibrates for other medicines. Used to control high cholesterol, statins and fibrates may interfere with muscle growth, causing a decrease in muscle energy. Ask your doctor whether it's prudent to swap statins and fibrates with vitamin B12, folic acid, and vitamin B6. This may be an option if your cholesterol is borderline rather than high.[15]

    • Tell your doctor if your leg cramps started just as you began taking a new medication. More often than not, they can find other medicines to treat high cholesterol.
    • Ask your doctor if you may be able to control your cholesterol levels with diet. Also, make sure that you are only taking 1 medication if it is needed to control your cholesterol.
    • Commonly prescribed statins include Lipitor, Lescol, and Crestor. Commonly prescribed fibrates include Bezalip, Lipidil, and Lopid.

  4. Consult your psychiatrist if you experience leg cramps while taking antipsychotics. Drugs that are used to treat depression, schizophrenia, and other mental conditions can induce fatigue, lethargy, and weakness, sometimes resulting in leg cramps. Talk to your doctor if you believe you may be experiencing leg cramps as a result of antipsychotics and see if you can be prescribed a different medication.[16]

    • This class of drugs includes Abilify, Thorazine, and Risperdal.
    • Some antipsychotics can cause serious side effects. If you’re experiencing muscle spasms and other impacts on your physical movement, such as twitching or difficulty walking, from antipsychotics, tell your doctor immediately.



  • Try putting an ordinary motel-sized bar of soap under the part of your leg which has the cramp. Alternatively, apply hypo-allergenic liquid soap directly to the center of the cramp. Although no research exists to support this, some people report that these methods are effective at treating their leg cramps.
  • There are other supplements that have helped to alleviate leg cramps in some people, although results in clinical trials have been mixed. Ask your doctor if you might benefit from taking primrose oil or brewer’s yeast on a regular basis.


  • If leg cramps are frequent (as in 2-4 or more times every night), it could be a serious health problem. Consider getting checked out by a doctor if you experience chronic leg cramps or if the cramping is in 1 leg or around the calf region.

EditRelated wikiHows

EditSources and Citations

Cite error: tags exist, but no tag was found