Certainly some night trains on the continent which shuffle sets of carriages where they mix and match destinations can spend quite some time at one station. But as 181 says, that's usually in the middle of the night, so perhaps of less interest/use...
In the days of the through service Tallinn-Riga-Vilnius-Warsaw (which had I think stopped before the turn of the century, when the "modernising" of the three post-SU, and now EU, Baltic States led to them closing their rail connections with one another), the train arrived at Vilnius in the evening and waited for some time for an arrival from - I think - St Petersburg so that coaches from both could be joined up before the onward journey to Poland during the night. In my experience, there was plenty of time to get some food on the station, find a phone box to make a call to a local contact, and have a wander around. I can't now remember how long the train sat there, but I remember not having to feel rushed!
Of course there are also "dwell times" where a train is carried on a ship, which kind of fits the question ... but in Europe this now only applies to the crossing between Sicily and the Italian mainland (where there's time to get a snack and a drink on the boat). On the internal Danish train ferries - when they operated - I don't remember getting off the train onto the boat; perhaps it wasn't expected on a relatively short crossing. On the old Denmark-Sweden international crossing (pre-"The Bridge"), via Helsingor-Helsingborg, it was all so quick and efficient - and it was a pretty short crossing - I don't remember there really being much chance to enjoy getting out onto the ship even if you wanted to. The (also now closed - though the tunnel to replace it won't be ready for a while yet) Fehrman Belt crossing between Denmark and Germany, however, was a bit longer, giving time to stretch your legs.
There are often long dwell times at border stations - though the situation is likely to be one where you very much can't wander around during the process! At Grodno in Belarus (the Lithuania-Poland through route used to cut through a little corner of Belarus), it could take hours to switch all the bogies for the change of track gauge. I did once get to see some of the local area during that time - but involuntarily, and not the bits I might have liked to have seen - when I was taken off the train by Belarussian officials who were trying to make me pay for a transit visa I didn't technically need, and I was refusing to give them any money. The resolution of the stand-off took up almost all the time the train was there.