I entered upon Abu Sariha Huzaifa bin Usayd al-Ghifari, and he said, "I heard the Messenger of Allah ﷺ with these two ears of mine say, 'The drop of fluid settles in the womb for forty nights, then the angel takes shape over it.'"Zuhayr said, "I think he said, 'the angel who forms it.'""The angel then says, 'My Lord, male or female?' So Allah makes it male or female. Then he says, 'My Lord, sound or defective?' So Allah makes it sound or defective. Then he says, 'My Lord, what is its provision, what is its lifespan, what is its character?' Then Allah makes it wretched or happy."
حدثني محمد بن أحمد بن أبي خلف حدثنا يحيى بن أبي بكير حدثنا زهير أبو خيثمة حدثني عبد الله بن عطاء أن عكرمة بن خالد حدثه أن
دخلت على أبي سريحة حذيفة بن أسيد الغفاري فقال سمعت رسول الله ﷺ بأذني هاتين يقول إن النطفة تقع في الرحم أربعين ليلة ثم يتصور عليها الملك قال زهير حسبته قال الذي يخلقها فيقول يا رب أذكر أو أنثى فيجعله الله ذكرا أو أنثى ثم يقول يا رب أسوي أو غير سوي فيجعله الله سويا أو غير سوي ثم يقول يا رب ما رزقه ما أجله ما خلقه ثم يجعله الله شقيا أو سعيدا