We will be taking the night train from Budapest into Romania. I want to make sure we get stamped out of Schengen area to burn off extra time in Romania. Has anyone done this? What is the process?
Normal procedure is to give your passport to the train attendant when you board and he/she takes you to your compartment. They have all the passports when they do the last stop before entering Romania, they get them stamped, then an entry stamp at the first stop in Romania. You don't get woken up unless the border agents want to talk to you. You get your passport back when the attendant comes by to knock on the door 30 minutes before your arrival station.
I've taken a lot of night trains over the years, and Sam describes the process I've always had when in a sleeper. If you are in general seating, then they will wake you as they go through the car checking passports. Although it sometimes happens, it is rare that your passport would not be stamped when leaving the Schengen Zone.
While I have not taken a night train (though the process described above is correct), I have crossed "soft Borders" (like Germany to Czechoslovakia in 2000) where they may not stamp, or in that case, even check passports. In that event, just keep a record of where you were at (Train Ticket, a few hotel receipts, Return ticket) so if questioned, you have some objective evidence of what you are telling them. Of course none of this is even usually a problem unless you are "counting days" in order to do the Schengen Shuffle.
Re: checking and stamping passports in 2001, that certainly was done by both the Germans and Poles when I went into Poland from Berlin and then left Poland going back to Berlin on the trains.
When we went to Prague from Germany in 2000, we drove, all we did was slow down at the border and all wave our passports at the border guard as we went through. (My brother had driven that route a number of times, so knew the drill)