Should i masturbate?

Recently i went with my gynecologist for a normal check up and she gave me antibiotics (Metronidazole) but she told me not to have sex during 7 days. It’s day 4 and i been horny all day;(

can i masturbate?