You may be awakened and have to show your passport to the border police on the train. My experiences with trains coming into Germany is that the Grenzschutzpolizei will check passengers and pay special attention to those that they think may be doing drugs or illegally in the country. Going out of Germany you may not be bothered, but the Dutch may have their own version.