These cramps usually happen throughout the night.
Night leg cramps is mostly caused due to dehydration, prolonged sitting, inadequate amounts of potassium, calcium and magnesium in the diet; and medications including diuretics, beta blockers and others used to treat blood pressure. Gently massage the affected muscle. Apply ice or a cold pack which may reduce pain. Another option is applying heat, with a warm towel, heating pad or by taking a warm bath or shower.