It was narrated from 'Umar that:
the Messenger of Allah ruled that the child belonged to the bed.
English reference: Vol. 3, Book 9, Hadith 2005
Arabic reference: Book 9, Hadith 2083
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.