It depends on what time the attendant opens the train.
I have done this ride a few times in both directions as I have family in very southern Poland.
It is a very comfortable ride, except for the fact that you still get woken up four times throughout the night, twice at each border.
The reason why the ride is so long because the train goes through the mountains, the route in Poland to the border is not exactly direct, and there still is some time wasted on the borders