The following is a translation from an Arabic Q&A:
Question: Please explain the hukm regarding separation of children in their beds. At what age is separation an obligation upon the parents? Also can a parent sleep in the same bed as their child?
1- With regards to separating children in their beds, it is clear that the separation which is obligatory is when they reach the age of 7 and not since their birth. This is due to the hadith reported by Daarqutni and al-Hakim from the Messenger (saw) who said: "When your children reach the age of 7 then separate their beds and when they reach 10 beat them if they do not pray their salah.’ This is also due to what has been narrated by al-Bazzar on the authority of Abi Rafi’ with the following wording: ‘We found in a sheet near the Messenger of Allah (saw) when he died on which the following was written: Separate the beds of the slave boys and girls and brothers and sisters of 7 years of age.’ The two hadiths are texts on the separation of children when they reach the age of 7. As for the hadith reported by Ahmad, Abu Dawud: ‘Order your children to pray at the age of 7 and beat them when they are 10 (if they do not pray) and separate their beds.’ This does not specify the age at which the separation should take place. So it is interpreted according to the two hadiths which specify the time of separation which is the age of 7.
Therefore, it is obligatory on the parents to separate the beds when their children reach the age of 7 but before that age it is not obligatory.
2- As regards separation of the beds between the parents and their children. It is clear that separation between parents and children is not obligatory due to the hadith reported by Abu Dawud in which the Messenger (saw) said: ‘No man should reach /come to sleep with a man, nor woman with a woman except with a child or a parent.’ This hadith is explicit in its prohibition of a man sleeping with another man in the same bed and a woman sleeping with another woman in the same bed. Thus, it becomes clear that the father and the mother sleeping with their children is not haraam or makrooh but rather there is nothing wrong with this. So it is allowed for a man to sleep with his children whether they are mature or not and the woman can sleep with her children whether the children are mature or not according to what has been mentioned in this hadith. Not to mention the fact that the hadiths which require the parents to separate between their children have stipulated that it be between children, brothers and sisters: ‘when your children reach the age of 7 then separate their beds’ , ‘separate the beds of the slave boys and girls and brothers and sisters of 7 years of age’, ‘separate them in their beds,’. All of these texts are specific to children, brothers and sisters and do not include parents whether by the pronounced (mantuq), implied (mafhum), explicit (sareeh) or indicated (dalalah) meaning. So the hadiths will be restricted to what they have indicated.