Masterbation

I’m on my period but I am very horny but I am not in town to have sex with my boyfriend. Can I still masterbate or no? Or does anyone have any ways I can get out of being horny?