I once took an overnight train from Paris to Berlin, arrived at about 7:00 a.m., and walked clear across the city to my AirBnb (from Mitte to south Neukölln, for any Berliners.) It was a really fantastic way to discover the city for the first time. I don’t think flying in to an airport then taking a taxi would have been nearly as memorable.
The only problem IMO is that sleeping on a train is not comfortable unless you’re young. It’s basically a minor step up from staying in a hostel in terms of noise, other people, and general cleanliness. I think there would need to be a dramatic upgrade in the quality of sleeping cabins for trains to really replace flights.