I find that I get cramps when I'm too tense, and consequently don't breathe as deeply and evenly as I should be. I find that when cramps start, the best solution is to consciously relax and concentrate on making my breathing regular, taking full breaths. After a few minutes the cramp disappears. I hope this helps!
Sandra