Generally these are due to low calcium levels or low (below 10) vitamin D-3 levels. Get a D-3 blood test and drink a few glasses of milk.
Quinine sulfate capsules were available over the counter in the U.S. for a hundred and fifty years to help with such cramps. Recently they have been banned without prescription because of several deaths fro patients who popped them like candy. They are still available in Australia, from what I have been told. They do cause ventricular irritability and if you take them do not exceed the recommended dose.