Small children are well known to be afraid of voids (closets, under the bed) in their sleeping area. Knowing this, why don't we design children's rooms to eliminate them?
I'm not a parent, but going by pop culture, it seems like literally every child has the same fears.
In pre-modern times, I imagine that they'd be sleeping in the same room as the parents, but if modern notions of privacy don't permit that, seems we could at least design an enclosed capsule or something.
I think fear is an important part of our development, and sanitizing children's upbringings is rarely the best approach. I love when my child communicates that they're afraid of something because that gives me an opportunity to guide them through how to encounter and process that fear, and how to continue functioning in life when fear is present (which is always for a lot of people).
Also, for kids who are scared of their closet or under their bed at night, if you remove those triggers I would be surprised if other triggers did not arise. It could easily turn into a never ending game of whack a mole.