Here in the UK there are laws against public indecency, but these are enforced with common sense. I have never heard of anyone fleeing a fire or other emergency being charged with indecency if naked.
Prosecutions for indecency are usually against drunken youths who strip in public for a dare or as a protest.

Almost no one in the UK admits to wearing pyjamas, very last century you know ! Yet millions of the garments are sold and someone must wear them.

I would consider pajamas or scrubs to suitable for nightwear, and either may be worn outside of the home in an emergency, even if not socially acceptable normally.

If however one is keeping clothing to hand for quick donning in an emergency, rather than for regular night time wear, then I would suggest that stretch garments are easier to put on in a hurry. Sweatshirt and sweatpants, or cotton jersey pajamas. Preferably garments with no obvious front or back, in order that they may be worn either way round without looking daft.