There are no FDA approved treatments for leg cramps and the non prescription and prescription treatment options are more from individual experiences and not from large trials proving effectiveness or safety.
That said, here are some options- trial and succeed but you may need a few trials…
1) Nighttime leg stretches of the most prone muscle groups- gentle stretch tension not bouncing- hold for count of twenty and repeat 3-5 x
2) B complex- B 50 3x a day- over the counter
3) Magnesium supplements if OK with your doctor Slo Mag or Mag Ox are over the counter 1 1-2x a day-
4) Consider trial of a week or two or three off Statin cholesterol medication if you are taking them
5) Diltiazem immediate release 30mg at bedtime
6) Escalating doses of gabapentin from 100mg up to 600mg as a bedtime dose- may take a few weeks to improve symptoms
7) Quinine has been used with mixed success (if any, but some patients swear by it) for many decades. It has recently been given a black box warning as it carries a 1 in 110—1 in 200 chance of severe blood clotting, bleeding and or bone marrow toxicity risk which could prove disabling or fatal. It is an option as a short term (1-2 months to see if it helps) trial only when all else has failed and the symptoms are so severe that the patient is willing to take a risk similar to base jumping (parachuting from cliffs and tall buildings), an extreme sport, to get relief.