Sex at 23 weeks after threatened PTL

Patient: Can i have sex at 23 weeks after threatened PTL?hi. im just too shy to ask my OB doctor for this concern. i am currently 23 weeks 3 days pregnant today. i was hospitalized january 20 due to dark brown bleeding and my cervix dilated to 1 cm having mild contractions and i was admitted for 5 days and was placed on CBR and was sent home but was still advised bed rest. everything on the test came out normal, doctors said that they were just worried because my cervix dilated. with the blood, they said it was old blood.i was 20 weeks pregnant at the time. i was lifting my grandma from bed the morning of my admission and masterbated alone the eve before the bleeding and cervix see, my partner is actually away and i am so craving badly for his presence and actually have sex with him. i have abstained from sex since knowing i was pregnant and that was since october last year. i know this is due to hormonal changes, but my sexual libido is just too much. i even ended up enjoying watching porn. :(i was so scared of what happened because that was the first time i masterbated my entire life. my partner is also having second thoughts about having sex because we don’t want to harm the baby. and we do not want anything bad to happen. we are planning to meet up again sometime soon and i just want to be know if it’s okay to actually do it? have sex? and just get over this crazy craving of mine. :(i had another episode of brown spotting january 27 but was not required to be admitted anymore. i was immediatley placed on bed rest and i have been continuing my meds utrogestan and isoxilan as advised by my OB and was advised to continue taking the meds until i reach 8th month of my far, up to now, i do not have any spotting or contractions. and latest ultrasound shows that everything is normal with the baby and with my pregnancy.i really am sorry to be asking this question. but would it be safe for me and the baby to have sex with actual penetration? i just want my partner to satisfy his sexual cravings as well. and being pregnant and all, with the body changes, i really am afraid he is already more interested in looking at others instead of me.this is totally making me insecure and depressed. just thinking that he might be sleeping with somebody else is killing me. i guess it’s also hormones. :(please help? would it be okay for me to have sex?

Symptoms: so far, i am just on bed rest and is not traveling far. no contractions, no spotting
i am having back aches but everytime i lie down, it goes away by itself