OK, lets look this up:
the US Food and Drug Administration (FDA) limits the quinine content in tonic water to 83 ppm[3] (83 mg per liter if calculated by mass), while the daily therapeutic dose of quinine is in the range of 5001000 mg,[4] and 10 mg/kg every eight hours for effective malaria prevention (2100 mg daily for a 70 kg adult).[5] It is often recommended as a relief for leg cramps, but medical research suggests some care is needed in monitoring doses.[6] Because of quinine’s risks, the FDA cautions consumers against using “off-label” quinine drugs to treat leg cramps.[7]
So, small amounts are apparently legal. I too have had leg cramps and obtained relief with the mild otc quinine pills that melt under the tongue. It works VERY well.
Fun Fact: In Boston all carbonated products are called ‘tonic’.
Two other things that help with leg cramps - magnesium and .... PICKLE JUICE! Not the sweet pickle kind. Bubbies or other non-vinegar ones work as well as kinds with vinegar. Pickle juice works almost instantly and as prevention. I wish I could buy jars of pickle juice.