In the US there's no set assignment. With Amtrak, it depends on the route: Florida trains tend to have the sleepers at the back of the train, while the Pennsylvanian has it's first class car in the front. On the Acelas, the trains reverse at the terminals without turning around so it could be on either end.