Praise be to Allah.Praise be to Allaah.
We have explained in many answers that one of the duties of parents is to treat their children fairly in giving gifts. See the answer to question no. 22169. What we said is that this applies to giving gifts, not to spending or maintenance,because that varies between young and old, and between male and female. What we said about maintenance we say also about the issue mentioned in the question, because it is well known to anyone with common sense that it is important that girls do not sleep in the same room as their brothers, and that older children do not sleep in the same room as small children. This issue has nothing to do with justice and fairness between children, rather it is dictated by nature and what is in the children's best interests. It is well known that the nature of females is different from that of males, and that females need in their rooms what they cannot share with their brothers. The same may be said in the case of children whose ages differ.
Based on that, there is no reason why a father should not allocate a separate room to his daughter -- for example -- even if she is on her own, and put the males together -- in appropriate numbers -- in one room. There is also no reason why he should not give an older child a room on his own, separate from his brothers who are younger than him.
We would like to draw attention to a number of things here, such as:
The importance of paying attention to separating the children in their beds from an early age, and this separation becomes essential when they reach the age of 10.
The Messenger of Allaah (blessings and peace of Allaah be upon him) said: “Teach your children to pray when they are seven years old, and smack them (lightly) if they do not pray when they are 10 years old, and separate them in their beds.” Narrated by Ahmad (6717) and Abu Dawood (495); classed as saheeh by al-Albaani in Irwa’ al-Ghaleel, 298. See also the answer to question no. 78833.
We do not think that it is good for older children to sleep in the same room as younger children.
Sometimes it may be better not to put each child -- male or female -- in a room on his own, because the Shaytaan is closer to one who is on his own, and more likely to whisper evil to him or encourage him to do bad or commit sin, than would be the case with two or three, so putting more than one in each room may be better.
We ask Allaah to set straight the affairs of all Muslim families and to help parents to raise their children well and take care of them.
And Allaah knows best.