I took statins for 12 years. In the past couple of years I started adding a lot more miles with greater intensity. After a ride, I would cramp up so badly I couldn't even sleep at night, and this was with plenty of fluids, electrolytes, etc.
About 6 months ago, I quit the statins cold turkey. What a difference! 85% of the cramping is gone.