Stretching, massage, heat, cold, hydration and over-the-counter pain medication are ways to treat a painful leg cramp, according to WebMD. These remedies combat the spasms or tightening of the muscles that cause cramping.
Putting weight on the cramping leg with the knee slightly bent often works for a calf or hamstring cramp, reports Mayo Clinic. An alternative is to extend the leg while sitting. Raising the leg toward the head may also help. When the quadriceps or front of the thigh cramps, bending at the knee and pulling the foot toward the buttocks can provide stretching relief for the pain.
Both heat and cold may help with muscle cramps, states WebMD. A warm bath or heating pad provides warmth, while ice provides cooling relief. Massaging while you apply the heat or cold can also help loosen the muscle, according to Mayo Clinic.
Dehydration is sometimes a cause of muscle cramping. Hydrating with water or a sports drink is a possible remedy for the cramps. A lack of minerals such as calcium and potassium is a potential cause of cramps. Increasing dietary consumption of those minerals may prevent muscle spasms in the future. If exercise is the cause of the muscle cramps, stretching before and after exercise may help.