Masturbating on period?

I read that masturbating on your period can help with cramps. Can anyone vouch for this? And if so what do you do about making a mess?