Leg cramps can occur anytime but usually it is seen that they occur at night. These cramps which result in abrupt, aching spasms are actually spasms that can take place anywhere in the leg. Various factors can be behind cramps in legs and if a person is experienced these quite often it is advisable to see a doctor. Leg cramps are usually caused by lack of vitamin E, calcium or magnesium. Sometimes cramps occur without any apparent reason though common causes include dehydration, inactivity, heat stroke, or rigorous exercise. Drinking up to ten glasses of water, a massage before sleep, stretching exercises and a healthy diet; all help in the prevention of cramps in legs.