Sex during pregnancy after history of miscarriage

Hi ladies,i am 28 weeks pregnant and havent had sex this whole pregnancy due to a history of miscarriage and my husband and i were trying for a while. What did you do to stay sexually active and did you prevent yourself feom sex until baby was born?