I get bad cramp like pains in my thighs from time to time (it's pretty bad right now in fact) that can knock me out for up to a week. I take magnesium (reduces muscle pain) and calcium (helps normal muscle function) tablets . Also, believe it or not, -
cherry juice. It's a powerful anti antioxidant to help muscle recovery. With my particular condition, co-enzyme Q10 does seem to have reduced the number of attacks I get as well as their severity. I would recommend you do a bit of research before taking though as a it can have side effects.
Other than that, keep hydrated and reduce alcohol/ caffene intake- all the obvious stuff really. Difficult though for me as I get pretty low when I can't ride, and strong lager often seems very necessary!