Very happy to hear you found the right remedy... Great to know the Apple Cider Vinegar (ACV) helped.
I had similar problems years ago and the lady doc told me to take a magnesium supplement which I´ve been doing since. Just mag. No calcium because I suppose I get enough with my daily (good) diet. In fact if I ate too much calcium, as in eating lots of cheese - which I´ve stopped doing for a long time now - the cramps set in sooner than usual. Recently was reading some info on mag. and it was stated that mag. is better absorbed by the body when taken with protein, as in after a protein-rich meal - which I now trying doing, if I remember!
We also use a fair bit of ACV in salads, etc!