Just like in a hotel, when it’s time to go to bed, you can wear your pajamas. If you’re sharing a couchette with strangers, it may be difficult to change, however. Certainly don’t sleep in the buff or in your underwear/revealing nightwear if you’re sharing the space with strangers. If you have a private cabin, you can do as you wish.