This is how it works: if you travel on a train (or multiple trains) that departs after 19:00 (7 p.m.) and arrives at its final stop after 04:00 (4 a.m.), you only need to enter the arrival date in the travel calendar, even if you leave the train before 4 a.m. This way you get 5 hours of travel for free.