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 variable, with cramps lasting anywhere from a few seconds to several minutes. Muscle soreness may remain after the cramp itself ends. These cramps are more common in older people. They happen quite frequently in teenagers and in some people while exercising at night. Besides being painful, a nocturnal leg cramp can cause much distress and anxiety. The precise cause of these cramps is unclear. Potential contributing factors include dehydration, low levels of certain minerals (magnesium, potassium, calcium, and sodium, although the evidence has been mixed), and reduced blood flow through muscles attendant in prolonged sitting or lying down. Nocturnal leg cramps (almost exclusively calf cramps) are considered "normal" during the late stages of pregnancy. They can, however, vary in intensity from mild to extremely painful.