I would love to do this more! Trying to replace short flights with trains. I'm taking the Zürich - Venice one in a couple of weeks.
But I'm looking for example at Zürich - Amsterdam. 12 hours - 10pm to 10am, perfect. But it has a 2:45am - 3:15am change at Frankfurt, so it's actually a ~5h train followed by a ~7h train at a very inconvenient time. Sure, I'd be in Amsterdam by 10am, but after the equivalent of a terrible night. Is there a better way to do this kind of thing?
I am not sure which connection you found - the 21:59 Nightjet NJ 402 from Zurich goes directly to Amsterdam (9:58). NJ 402 has some additional cars attached which run as an InterCity, so it might be possible that no bed is available until Frankfurt, and you have to sit in an IC car until Frankfurt and change into the sleeper there, or vice versa.
Night trains typically use slower routes and are parked somewhere during the night to ensure that you have enough time to eat something in the evening, get dressed for bed, sleep 8 hours, get up, get dressed again, and eat breakfast.
8 hours is definitely not enough time for a comfortable night train ride, especially if you travel with children. We took an 11-hour night train from Vienna to Zurich a few months ago with a 3 year old, and we would've been grateful for an additional hour in the morning.
It's not lost time either. The whole point of a sleeper train is that you get in, sleep a decent night's sleep, wake up, and move on. Ideally you board around 21:00 and get off around 7:30. The extra space in the train's timetable is also helpful in keeping the train on-time if delays occur en-route.
There are also many stops on the way and you might only get on in Basel or get off somewhere in Germany already, leaving you with even less time on the train, so 12h for the full Zurich-Amsterdam trip is not unreasonable.
I'm not sure where you're looking but I've taken that exact train several times, without any connection, and with a bed the whole way. I recommend looking directly on NightJet's website.
But I'm looking for example at Zürich - Amsterdam. 12 hours - 10pm to 10am, perfect. But it has a 2:45am - 3:15am change at Frankfurt, so it's actually a ~5h train followed by a ~7h train at a very inconvenient time. Sure, I'd be in Amsterdam by 10am, but after the equivalent of a terrible night. Is there a better way to do this kind of thing?