Ruling on Sex During Pregnancy in Islam
Question

Please inform me if it is valid to have intercourse with my wife in the advanced state of her being pregnant. She is at the moment in her 7th month.
Praise be to Allah.Is sex during pregnancy allowed? 
It is permissible for a man to have intercourse with his pregnant wife whenever he wants, unless that will cause her harm, for it is haram for him to do anything that will harm her. 
If it will not cause her harm but it is difficult for her, then it is better for him not to have intercourse with her, because avoiding things which are difficult for her is a kind of living with them honourably. Allah says (interpretation of the meaning):
“and live with them honourably.” [al-Nisa 4:19]
Sex during menses in Islam
But it is haram for a man to have intercourse with his wife when she is menstruating , or to have intercourse with her in her back passage , or to have intercourse with her when she is in nifas (bleeding following childbirth). That is haram and is not permitted, and a man must avoid that and do that which Allah has permitted.
If she is menstruating then he may enjoy her in other ways, apart from the vagina and back passage, because the Prophet (peace and blessings of Allah be upon him) said: “Do whatever you like apart from intercourse.” (Narrated by Muslim, al-Hayd, 455). (Fatawa al-‘Ulama fi ‘Ushrat al-Nisa by Ibn ‘Uthaymin, p. 55)
For more, please see these answers: 1103 , 77514 , 311 , and 2006
And Allah knows best.