If you have booked a low-priced single seat car or single couchette ticket in the public area, you share the car with foreign travelers. You must therefore wear a mask (as in IC/ICE or public transport) for the entire duration of your journey.
If you have booked a couchette ticket in a private compartment or sleeper ticket, you will travel exclusively in your own private compartment with your relatives/friends, but without the boarding of strangers. Therefore, you do not have to wear a mask in your compartment and can breathe freely. However, please wear your mask when boarding and disembarking and when traveling in the corridors.