A muscle cramp is a strong, painful contraction or tightening of a muscle that comes on suddenly and lasts from a few seconds to several minutes. It often occurs in the legs. A muscle cramp is also called a charley horse. Nighttime leg cramps are usually sudden spasms, or tightening, of muscles in the calf.The muscle cramps can sometimes happen in the thigh or the foot.ou may need to try several different ways to stop a muscle cramp before you find what works best for you. Here are some things you can try: 1  Stretch and massage the muscle. 2  Take a warm shower or bath to relax the muscle. 3  A heating pad placed on the muscle can also help.