I recall from childhood holidays that sleeper and couchette stewards sometimes used to collect passports on boarding international overnight trains for later examination by immigration officials, avoiding the need to wake the travellers at border like this. Passengers in seating accommodation on the same trains were not afforded the same luxury. This was pre-Schengen western Europe, so I guess the sleeper operators are no longer geared up to do this anymore. Forcing people up in the early hours is a very customer unfriendly procedure. I understand why they're doing it, but hope it's a temporary thing. If not they need to come up with something better.