Brown and Hershkovitz (here: תשמיש בהריון-פסקה ז. דעת חז"ל) say that according to Chazal there is no problem having sexual intercourse during pregnancy, as long as there's an effective and permissible way of preventing fetal risk...
According to their words (of B&H) there are 2 main sources talking about the risks of having sexual intercourse during pregnancy:
- same source as @kouty brought in his answer above. Regarding to that, it is important to note that most of the poskim think that mitzvat עונה-conjugal rights, which appears in Exodus 21:10- "If he take him another wife, her food, her raiment, and her conjugal rights, shall he not diminish") exists during the entire pregnancy as long as the wife wants it and it's for her own good.
- Rabby Meir (Yebamoth 12b) which says that "ג' נשים משמשות במוך. .. מעוברת - שמא יעשה עוברה סנדל" (sorry, but I don't know how to translate it in appropriate way--maybe someone here can help); in simple words: having sexual intercourse during pregnant women are directed to some specific occupation in order to preventraising a risk toof another impregnation, which puts the fetus under risk. However, Rabanan think that this risk is very low, and that is why people shouldn't do nothing about it (except saying "מן השמיים ירחמו")