I always get more cramping on cycle but it was particularly bad in my last one when I took Anavar. Same thing as you, shin splints, along with general cramping.
Magnesium did work for me. I only got the shits from it once. Try taking a lower dose. They say potassium is for cramps you get while resting, while magnesium helps with exercise induced cramps.