How to not orgasm in my sleep? 🙁

De

At 9 weeks my obgyn put me on pelvic rest due to a SCH that caused some minor bleeding, and since then i haven't masturbated or had sex in spite of being really horny. Fast forward to 11 weeks and i started bleeding again, severe bleeding and significant clots. The ultrasound showed baby is alive and well but again I was advised to stay on pelvic rest. My mind/body have different ideas! Every night for the past week I've been having erotic dreams and last night I woke up orgasming😳 I immediately felt so awful, guilty and worried for baby. I haven't had any new bleeding but I'm terrified this will continue to happen and will eventually affect the baby. Help me!