Listen to your body and do whatever makes you feel good. Don't stop excercising just because you're on your period; in fact a little gentle exercise and stretching is really effective in relieving period pain.
Of course, if you find exercise is not helping menstrual cramps or making period pain worse then it may be best to see a doctor.