Pregnancy can be an extremely trying time, and masturbation has long been used to relieve stress and anxiety. Furthermore, orgasms have also been shown to aid sleep during gestation by stimulating hormone release which promotes relaxation and restful restful slumber.
Masturbation can help pregnant women feel more self-love during their gestation, and some report that orgasms offer them comfort as their bodies go through various changes during motherhood. Perhaps because touching the pelvic area during an orgasm creates feelings of intimacy with their pregnant bodies as part of its soothing therapeutic benefits.
Note, however, that if you're on pelvic rest due to complications of pregnancy such as placenta previa or preterm labor in the past, your doctor is likely to advise against masturbation as this may damage the cervix. Furthermore, if any pain or bleeding develops after masturbation has taken place it should immediately stop and contact a healthcare provider immediately.
Keep sex toys clean before and after each use to reduce the risk of sexually transmitted infections (STIs). Sharing toys increases STI risks; therefore it is recommended to always use a condom when masturbating. If your concern lies in its cleanliness then boil your toy in hot water in order to sterilize it before use.