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.