Stretching. Relax the cramping muscle. Stop any activity that may have induced the cramp and lightly stretch the muscle, gently holding the stretch. You may even massage the muscle while or after you stretch, and maybe apply a heating pad as described below, to the area after stretching.