Sahih Muslim Book 33, Hadith Number 6396.

Chapter : The growth of a child in the womb of a mother and his destiny in regard to his livelihood, his deeds. both good and evil.

Hadhaifa b. Usaid Ghifari, a Companion of Allah’s Messenger (may peace be upon him), reported it directly from Allah’s Messenger (may peace upon him).as he said: There is an angel who looks after the womb when Allah decides to create anything after more than forty nights are over; the rest of the hadith is the same.