Sex in pregnancy is generally safe if the couple keeps a few things in mind.
1. Sex in the first trimester or first 3 months is usually avoided, as it is an important time of pregnancy.
2. From 4th month onwards, sex is generally safe.
3. The frequency, position etc. depends upon the patient's comfort levels. There are no fixed rules.
4. In the last month, sex is thought to increase chances of spontaneously going into labor.
5. Physical intimacy must definitely be avoided in certain situations, bleeding or pain during pregnancy, an increased risk of premature labor pains, rupture of membranes and leaking, previous bad obstetric history etc. In the case of doubt, consult with your doctor.