night time leg cramps in both legs

I get bad leg cramps going from one to the other

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.