One method for relieving leg cramps is gentle stretching of the affected muscle, according to WebMD. If the cramp occurs in the calf or hamstring, putting weight on the leg and bending the knee can help, while pulling the foot toward the buttock may soothe a cramp in the quadriceps.
Applying ice or heat and massaging the affected area are additional treatments for leg cramps, notes WebMD. Soaking in a bath with Epsom salt may also bring relief.
While leg cramps are intense and painful, they are relatively harmless, explains WebMD. Since leg cramps are often a result of fatigued muscles and dehydration, stretching sufficiently before exercise, eating foods rich in magnesium and calcium, and drinking plenty of fluids, especially during hot weather, can help prevent them.