Try stretching the muscle. For example, you can stretch a cramp in the calf of your leg by straightening your lower leg and pulling your foot toward your head. It may also help to stand on the leg that is cramping. Spasms that last a long time may be treated with moist heat for 20 to 30 minutes several times a day. Your health care provider may give you stretching exercises.
Massage is very helpful.
If you have severe cramps in your legs at night, your health care provider may prescribe some medicine to help. Proper stretching exercises will help prevent spasms. Loosen the covers at the foot of your bed to help prevent leg cramps when you are sleeping. If you tend to get muscle cramps during exercise, make sure you drink enough fluids. Sports drinks may be very helpful.