High Risk masturbation

Im only 6 weeks but considered high risks because of past miscarriages. Im in the mood but I don’t want sex, is it safe to masturbate?? I don’t wanna do anything to harm my sweet rainbow baby but I want an organism so bad! Help!!