Sayyiduna Sa'd bin Abi Waqqas (may Allah be pleased with him) narrates: The Prophet (peace and blessings be upon him) gave this judgement: The child belongs to the owner of the bed.
Al-Bazzar recorded it. Its chain contains a narrator, Abd al-Aziz bin Imran, and he is matruk (abandoned).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الطلاق / 7848