Welcome to HCM.Masturbation
has no relation to menstruation
and you do not have any serious problem. Don't worry.
Emotional disturbances do have influence on menstruation. When masturbating take care that you do not injure your vagina, when using sexual aids
such as vibrators, dildos etc. If there is injury
, periods will be painful.
Wish you all the best.