Ever since I have been using magnesium supplements, my cramps have gone away. While I had them, at the time, I also focused on high cadence as well, for several weeks until my legs started feeling better and I felt I could put some watts down. I also drink plenty of water and never feel dehydrated.