Bacterial vaginosis

I’m taking metrogel to cure bacterial vaginosis. Is it okay to masturbate?