Masturbating while pregnant?

my baby’s father & I are no longer together..

& these pregnancy hormones have me all over the place.

Was wondering if it’s safe to masturbate or even use a vibrator while pregnant?

Currently 20weeks.

Any feedback would be helpful 🙂