If you have a cramp, these actions may provide relief:
Stretch and massage. Stretch the cramped muscle and gently rub it to help it relax. For a calf cramp, put your weight on your cramped leg and bend your knee slightly. If you're unable to stand, sit on the floor or in a chair with your affected leg extended. Try pulling the top of your foot on the affected side toward your head while your leg remains in a straightened position. This will also help ease a back thigh (hamstring) cramp. For a front thigh (quadriceps) cramp, use a chair to steady yourself and try pulling your foot on the affected side up toward your buttock.
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. Alternatively, massaging the cramped muscle with ice may relieve pain.