I've never considered the safety angle, but if I'm using the airline's PJs, I don't put them on until a couple hours into the flight. Usually after the first meal. And my wallet, passport, and phone never leave my direct control - either on my body or within arm's reach. If I'm asleep, they're definitely on my body in a place no one could get to without waking me up.
I would think FAs would advise people not to change clothes during the boarding process - if for no other reason than it's unnecessary movement and complexity while they're just trying to get people loaded and seated so the plane can depart.