Mastering and Cramps

I have a question. How come when I finger my self right before or during my period I get cramp.