Self-care measures usually can treat muscle cramps. A health care provider can show you stretching exercises that can reduce the chances of getting muscle cramps. Drinking plenty of fluids can also help prevent muscle cramps.

If you keep getting cramps that wake you from sleep, a care provider might prescribe medicine to relax muscles or help you sleep.

From Mayo Clinic to your inbox

Sign up for free and stay up to date on research advancements, health tips, current health topics, and expertise on managing health. Click here for an email preview.

To provide you with the most relevant and helpful information, and understand which information is beneficial, we may combine your email and website usage information with other information we have about you. If you are a Mayo Clinic patient, this could include protected health information. If we combine this information with your protected health information, we will treat all of that information as protected health information and will only use or disclose that information as set forth in our notice of privacy practices. You may opt-out of email communications at any time by clicking on the unsubscribe link in the e-mail.

Clinical trials

Explore Mayo Clinic studies testing new treatments, interventions and tests as a means to prevent, detect, treat or manage this condition.

Lifestyle and home remedies

If you have a cramp, these actions might help:

  • Stretch and massage. Stretch the cramped muscle and gently rub it. For a calf cramp, keep the leg straight while pulling the top of your foot on the side that's cramped toward your face. Also try standing with your weight on your cramped leg and pressing down firmly. This helps ease a cramp in the back of the thigh too.

    For a front thigh cramp, try pulling the foot on that leg up toward your buttock. Hold on to a chair to steady yourself.

  • Apply heat or cold. Use a warm towel or heating pad on tense or tight muscles. Taking a warm bath or directing the stream of a hot shower onto the cramped muscle also can help. Rubbing the sore muscle with ice also might relieve pain.

Alternative medicine

Taking vitamin B complex and other vitamins might help manage leg cramps. Talk to your health care provider about what to take.

Preparing for your appointment

See a health care provider if you have muscle cramps often that are severe and not getting better with self-care.

Here's some information to help you get ready for your appointment.

What you can do

Make a list of:

  • Your symptoms, including any that seem unrelated to the reason for your appointment, and when they began.
  • Key personal information, including major stresses, recent life changes and family medical history.
  • All medicines, vitamins and supplements you take, including doses.
  • Questions to ask your provider.

For muscle cramps, questions to ask your provider might include:

  • What's likely causing my cramps?
  • Are there other possible causes?
  • What tests do I need?
  • What can I do about the cramping?

Ask any other questions you have.

What to expect from your doctor

Your provider is likely to ask you questions, including:

  • How often do you get cramps and how bad are they?
  • What, if anything, do you do before you get a cramp? Do cramps usually happen after exercise?
  • Do you get cramps while resting?
  • Does stretching help your cramps?
  • Do you have other symptoms, such as muscle weakness or numbness?
  • Have you noticed changes in your urine after exercise?
March 07, 2023
  1. Muscle cramp. American Academy of Orthopaedic Surgeons. Accessed Nov. 2, 2022.
  2. Winkelman JW. Nocturnal leg cramps. Accessed Nov. 2, 2022.
  3. Muscle cramps. Merck Manual Professional Version. cramps. Accessed Nov. 2, 2022.
  4. Maughan RJ, et al. Muscle cramping during exercise: Causes, solutions, and questions remaining. Sports Medicine. 2019; doi:10.1007/s40279-019-01162-1.
  5. Coping with muscle cramps: Why you don't have to live with this common pain. American Osteopathic Association. Accessed Nov. 2, 2022.


Products & Services