I don't have children so if my views are inconsistent with the majority of parents, that may be why.
What I do have are two wonderful nephews with whom I am very close. The older nephew is amazing...now 26. I couldn't be prouder of him.
When older nephew was little (maybe 8), he was quite defiant with everyone except me; he always complied with my instructions because I took the time to explain to him the reasons. He used to want to play in the front yard all the time and people would just yell at him to return to the backyard. I took him aside one day and asked him if he understood and he said he didn't. That is when I allowed him a glimpse of the world he lives in. I told him there were dangerous people in the world and that they stole children from their parents, hurt them, and even killed them. I said he was less safe in the front yard than the backyard because if one of the bad people was driving around, he or she could easily see him, pull up and grab him very quickly, and we may never find him in time. Of course my nephew was scared to learn that the world wasn't a completely safe place...but he ended his defiance about playing in the front yard and he started studying martial arts. My nephew became more aware and through his awareness, he increased his safety. My family was not happy that I reduced his innocence but I truly believe we increase the vulnerability of our children by shielding them from the unpleasantness of the world.
I think children need to be old enough to understand the risks of spending the night somewhere else. They need to understand that the parents are not there to protect them, that they could be hurt by either other young people in the house or by the adults in the house. They need to feel empowered to call home at any time during the night to request a pick up because of discomfort.
And this knowledge of risks and ability to turn to the parents for back-up applies to more than just spending the night places.
Unfortunately as a child I could not turn to my parents so I suffered more than I should have. One time my parents were in the next room while I was being molested by their friend's son. He and my brother were much stronger than I so there was little I could do. History had taught me that if I told my parents they wouldn't believe me and if I screamed for help, drawing attention to me, I would have been badly beaten when I got home.
So a relationship where the kids understand the dangers, understand to be aware of them as they live, and understand that the parents are always available to help them when needed or wanted would be my preferred approach.
just my 2 cents