Huzaifa bin Usayd reported,

A companion of the Messenger of Allah ﷺ traced the hadith back to the Messenger of Allah ﷺ, that an angel is assigned to the womb. When Allah wills to create something, by Allah's permission, after forty-odd nights... He then mentioned a narration similar to theirs.

Muslim 6729

Sahih

حدثنا عبد الوارث بن عبد الصمد حدثني أبي حدثنا ربيعة بن كلثوم حدثني أبي كلثوم عن أبي الطفيل

عن حذيفة بن أسيد الغفاري

صاحب رسول الله ﷺ رفع الحديث إلى رسول الله ﷺ أن ملكا موكلا بالرحم إذا أراد الله أن يخلق شيئا بإذن الله لبضع وأربعين ليلة ثم ذكر نحو حديثهم

مسلم 6729صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Decree
Chapter
How the human is created in his mother's womb and the recording of his provision, lifespan, deeds, misery, and happiness
Numbering
Darussalam 6729
Muslim 6729