The actual cause cramps in the legs and feet is not known, but it may be caused by conditions or activities such as overuse of muscles, dehydration, nerve compression, mineral deficiency and cold weather, according to Mayo Clinic. Cramps may occur while asleep, in the morning or during physical activity.
Leg cramps are sudden muscle contractions, typically in the lower part of the leg, states About.com. Most leg cramps affect muscles that pass two joints, such as the calf muscle that crosses the knee and ankle joints. The majority of leg cramps are short-lived, lasting one minute or less, and often occur at night.
Leg cramps are often the result of muscle fatigue, says WebMD. Causes of muscle fatigue can be overworking the muscle or standing on hard, unyielding surfaces for long periods of time. Dehydration is another common cause of leg cramps, as is remaining immobile for too long. Certain diseases such as diabetes, hypothyroidism and Parkinson's disease exacerbate leg cramps, as do alcoholism, low blood sugar and deficiencies of calcium, potassium or magnesium.
There is no specific remedy for muscle cramps, but there are several ways of stopping them. Such measures include massaging the muscle, relaxing the muscle with warm water, taking a painkiller, and drinking plenty of fluids, claims WebMD. Elderly people are at higher risk of muscle cramps because they lose muscle mass, making the muscles easily overstressed. Bananas, because of their potassium content, are a good food for preventing leg cramps.