Sleep is Sleep
Some people want you to believe sleep only counts for babies and children when it's in a designated sleep room, alone and in the dark. Which is quite ridiculous when you consider all the different ways and places adult humans sleep perfectly fine!
This is because a sector of modern society see sleep as a behaviour which needs to be controlled and regulated in case bad habits take over. Which comes, not from evidence-based research in recent decades but from child-care advice created by middle-aged white men in suits in the Victorian era and earlier, who based a lot of their advice on the writings of Ancient Greece. Or the Bible.
Sleep occurs when we feel comfortable and safe. That might be on a train, the couch in front of the TV or on the beach getting sunburnt. For children it can be in the middle of eating dinner , in the car on a drive after school or in a carrier on a parent's back. Sleep is sleep. If you need it, you'll take it.
Of course sleeping at night for several uninterrupted hours in your own comfortable space is an excellent option. It is one which parents certainly aspire to. Which is possibly why they can become slightly obsessed with their children getting the "right" kind of sleep. Because when children sleep, adults can too and that is really important. But it doesn't mean children have a sleep problem. It means the adults are parents and that is an exhausting stage in life! Our sleep may be broken but our children are not.