Earlier quoted context omitted.
"I’d arrive in a new city each morning feeling refreshed because of the train’s sleeping accommodations." Aeh, where were you travelling? Many countries did not have sleeper trains. Don't get me wrong. I did the same, travelling at night in trains, and it saved me a night in a hotel. But I did not arrive well rested, I arrived train wrecked.
I spent a couple weeks travelling by train across Europe a few years ago on an Interrail pass. I found sleeper cabins were generally pretty comfortable, though you do have to pay extra for them. If you were just sleeping in a seat then yes I can believe you felt awful the next day.
The closest I've been to a sleeper in recent decades has been five hours on a cold station because cancellations & delays have meant missing the last onward connection of the day so waiting for the first morning service (there are supposed to be provisions for that by way of providing accommodation or replacement taxi service, which do sometimes work, but at that time of night there isn't always someone available & reachable to enact such policies).