Hudhayfah traced this to the Prophet ﷺ, who said, "The angel enters upon the drop of fluid after it has settled in the womb for forty or forty-five nights and asks, 'My Lord, will it be wretched or blessed?' Both are written down. Then he asks, 'My Lord, male or female?' Both are written down, along with the person's deeds, traces, lifespan, and provision. Then the pages are folded up, and nothing is added to them or taken away."
حدثنا محمد بن عبد الله بن نمير وزهير بن حرب واللفظ لابن نمير قالا حدثنا سفيان بن عيينة عن عمرو بن دينار عن أبي الطفيل
يبلغ به النبي ﷺ قال يدخل الملك على النطفة بعد ما تستقر في الرحم بأربعين أو خمسة وأربعين ليلة فيقول يا رب أشقي أو سعيد فيكتبان فيقول أي رب أذكر أو أنثى فيكتبان ويكتب عمله وأثره وأجله ورزقه ثم تطوى الصحف فلا يزاد فيها ولا ينقص