In recent times, the only medication that has been widely used to prevent, and sometimes also to treat,
cramps is
quinine.
Quinine acts by decreasing the excitability of the muscles. It has also been shown to be effective in many, but not all, scientific studies. However, quinine also causes birth defects and miscarriages. It has also occasionally caused hypersensitivity reactions and a deficiency of platelets, which are the blood components responsible for clotting.