Heard this from a TV doctor, put a bar of soap in between your sheets, I put it by my legs. I used to get leg cramps about once or twice a month, now get once every 3 or 4 months. This TV doctor said he didn't know why it worked, but it does.
My husband had severe leg cramps. He started taking calcium magnesium and vitamin D3. The cramping stopped and has not returned. Until that started working the Doctor prescribed Norflex which is a muscle relaxant. It really works!