Health Encyclopedia
Search Clinical Content Search Patient Health Library
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A-Z Listings

Leg Cramps

A muscle cramp or spasm is a strong, involuntary contraction of the muscle fibers. It occurs suddenly. It's also called a charley horse. This may occur in the foot, calf, or thigh at night when the legs are elevated. Muscle cramps can occur after exercise. If the spasm is prolonged, it can become very painful. This may be caused by sleeping in an uncomfortable position, muscle fatigue, poor muscle tone from lack of exercise and stretching, dehydration, electrolyte imbalance, diabetes, alcohol use, and certain medicine.

Home care

  • Drink plenty of fluids during the day to prevent dehydration.

  • Stretch your legs before bedtime.

  • Eat a diet high in potassium. These foods include fresh fruit, such as bananas, oranges, cantaloupe, and honeydew melon. It also includes apple, prune, orange, grape and pineapple juices. Other foods high in potassium are white, red, and pinto beans, baked potatoes, raw spinach, cod, flounder, halibut, salmon, and scallops.

  • Talk with your doctor about taking mineral and vitamin supplements that contain magnesium and vitamin B-12 if you are not already taking these. Other prescription medicines may also be used.

  • Stay away from stimulants, such as caffeine, nicotine, and decongestants.

How to relieve an acute leg cramp

  • For mild pain, getting out of the bed and walking may help. Some people find relief with heat and massage. You can apply heat with a warm shower, bath, or compress. Some people feel better with a cold pack. You can make an ice pack by filling a plastic bag that seals at the top with ice cubes and then wrapping it with a thin towel. Try both and use the method that feels best for 15 to 20 minutes at a time.

  • For severe pain, stretching the muscle that is in spasm may quickly relieve the pain.

  • When the spasm is in your foot, your toes may curl up or down. To stretch the muscle in spasm, bend your toes in the opposite direction. If the spasm pulls your toes up, bend them down. If the spasm pulls them down, bend them up.

  • When the spasm is in your calf, bend the ankle so the foot points upward toward your knee.

  • When the spasm is in your thigh, bend or straighten the knee and hip until you feel relief.

Follow-up care

Follow up with your doctor, or as advised.

When to get medical advice

Contact your doctor right away if:

  • Walking makes your pain worse and rest makes it better.

  • You develop weakness in the affected leg.

  • Pain or frequency of spasms increases and is not controlled by the above measures.

Online Medical Reviewer: L Renee Watson MSN RN
Online Medical Reviewer: Rahul Banerjee MD
Online Medical Reviewer: Raymond Turley Jr PA-C
Date Last Reviewed: 4/1/2025
© 2000-2025 The StayWell Company, LLC. All rights reserved. This information is not intended as a substitute for professional medical care. Always follow your healthcare professional's instructions.
Powered by Krames by WebMD Ignite

These resources and their content are provided by a third party for informational purposes and do not necessarily reflect the values and positions of Ascension, its ministries, or its subsidiaries.

About StayWell | Terms of Use | Privacy Policy | Disclaimer

The Services may integrate with Third-Party Apps or contain third-party content or provide links to third-party websites. For example, the Services may integrate with Third-Party App providers to provide you with information. You authorize Ascension to transmit information about You to and receive information about You from applicable third parties.
You agree that Ascension is not responsible for Third-Party Apps, third-party content or third-party websites, and does not make any endorsements, representations or warranties regarding the same. Your use thereof is at Your own risk and subject to the third party’s terms and conditions, as applicable. By using a Third-Party App or third-party content or websites, You agree to the applicable third party’s terms and conditions, even if Ascension does not present them to You at the time of Your use.