Most leg cramps have no identifiable cause and happen at night when legs are slightly bent and feet are pointed downward. Electrolyte imbalances from dehydration, intense exercise, sedentary habits, ...