Cramps are unpleasant, often painful, sensations caused by contraction or over shortening of muscles. Cramps can be caused by cold, overexertion or low calcium level in blood (especially for adolescents where they need calcium for both blood and bone maturing). Illness or poisoning can also cause cramps, particularly in the stomach, which is referred to as colic if it fits particular characteristics. See alsoDelayed onset muscle soreness.

Electrolyte disturbance may cause cramping and tetany of muscles, particularly hypokalaemia (a low level of potassium) and hypocalcaemia (a low level of calcium). This disturbance arises as the body loses large amounts of interstitial fluid through sweat. This interstitial fluid is composed mostly of water and table salt (NaCl). The loss of osmotically active particles outside muscle cells(NaCl) leads to a disturbance of the osmotic balance and swelling of muscle cells as these contain more osmotically active particles. This causes the calcium pump between the muscle lumen and sarcoplasmic reticulum to short circuit and the calcium ions remain bound to the tropomyosin and the muscle contraction is continued.

Muscle cramps can be treated by applying a soft massage on the cramped muscle, stretching the muscle and applying heat or cold. Heat improves superficial blood circulation and makes muscles more flexible, so some people find that heat is more soothing for muscle cramps than applying ice. Application of excessive heat or cold to sore muscles may bring on cramps. Pounding on a cramped muscle can increase soreness.

In the case of inadequate oxygenation, excess lactic acid, produced by anaerobic respiration, builds up and stresses the muscle. In addition to the methods described above, cramps from poor oxygenation can be improved by rapid deep breathing.

Cramps from lack of water and/or salt can be treated, of course, by drinking water and/or increasing salt intake, respectively.

There is no scientific evidence to support the widely held claim by the sports nutrition industry that intake of specially composed electrolyte drinks has any advantage over intake of plain table salt (via drink or food) and water to counter these electrolyte disturbances and muscle cramps in people with a well-functioning renal system.

Leg cramps may also be due to vitamin D deficiency (also needed for calcium absorption). Due to change in diet, shunning milk because of high cholesterol content, or, in children, preference for soft drinks, and decreased sun exposure, vitamin D deficiency is widespread. Correcting this deficiency will in many cases also eliminate, or reduce, frequency of leg cramps.

Menstruation is also highly likely to cause cramps of varying severity in the abdomen that may radiate to the lower back and thighs. Menstrual cramps can be treated with ibuprofen, acetaminophen or paracetamol, stretching exercises, or the application of heat through such means as warm baths or heating pads. Menstrual cramps that do not respond to self-treatment can be a symptom of endometriosis or other health problems.

Skeletal muscles are muscles that can be voluntarily controlled. Of the skeletal muscles, those which cramp the most often are the calves, thighs, and arches of the foot. These cramps are seemingly associated with strenuous activity and can be intensely painful.

Nocturnal leg cramps are involuntary muscle contractions that occur in the calves, soles of the feet, or other muscles in the body during the night or (less commonly) while resting. The duration of nocturnal leg cramps is highly variable with cramps sometimes only lasting a few seconds and other times several minutes. Soreness in the muscles may remain for some time after the cramp ends. These cramps are more common in older people but may happen to anyone. They can happen quite frequently in teenagers and in some people while they are exercising at night. Nocturnal leg cramps can be very painful, especially if the person is dehydrated.

The precise cause of these cramps is unclear. Potential contributing factors are believed to include dehydration, low levels of certain minerals (magnesium, potassium, calcium, and sodium), and the reduced blood flow through the muscles attendant in prolonged sitting or lying down. Less common causes include more serious conditions or the use of drugs.

Nocturnal leg cramps may be relieved by stretching the affected leg straight out and pointing the toes upward. People report that quickly standing up and walking a few steps may also shorten the duration of a cramp.

Nocturnal leg cramps (almost exclusively calf cramps) are considered to be 'normal' during the late stages of pregnancy. They can however vary in intensity from mild to incredibly painful. Although unproved, a commonly accepted treatment is a starchy foodstuff before bedtime such as porridge or rice.

Self-induced cramp is brought on purposefully by individuals for the purpose of stretching muscle in a position where standing or greater movement is difficult or impossible. For instance, certain workers or craftsmen may find inducing cramp in the lower legs enables them to stretch desirable muscle groups without the need to physically stand in tight spaces. Induced cramp usually requires an elevated level of muscle mass to be possible and effective.