A muscle cramp is a sudden and involuntary contraction of one or more of your muscles. Straining, overuse a muscle, Compression of your nerves, not getting enough blood and low levels of elecrolytes are the main cause of muscle cramp. Stretching and massaging the muscle may help it relax. Applying heat or cold to the area may also help.