You likely have a potassium deficit. I had cramps all the time until I took vitamin supplements that contain potassium. No more cramps.
Of course you can also just eat healthier and get potassium that way. Supplements arenβt necessarily the solution for you.