For night trips, consider couchette compartments, available on many major routes.
From the nzherald.co.nz
The standard of a sleeping car of second class corresponds rather to a couchette by European standards.
From the en.wikipedia.org
It may be more expensive than catching a bus but it's a lot more comfortable as you can book a couchette and get a decent sleep.
From the nzherald.co.nz
On the train, slotted into a third-class couchette like a beige filing-cabinet drawer, I met a young couple from Maidstone.
From the independent.co.uk
Depending on the train, you may be able to choose between normal seats, couchette and sleeper cabins of different categories.
From the en.wikipedia.org
During dinner our couchette has been tidied and transformed into two bunk beds, with a tin of French pastilles left on our pillow.
From the couriermail.com.au
Our attendant returns our cabin to couchette form and a breakfast of pastries, fresh fruit salad and cheese is served in our cabin.
From the couriermail.com.au
If you've ever slept in a VW campervan, an Airstream feels positively palatial in comparison, with a dining couchette that turns into a double bed, two more single beds, a kitchen area and loo.
From the guardian.co.uk
More examples
A compartment on a European passenger train; contains 4 to 6 berths for sleeping
The couchette car is a railroad car conveying basic non-private sleeping accommodation.