It will depend on the train availability. We usually book return train ticket at 02:55 pm on day 7 so you arrive to Cusco at 06:30 pm and you have enough time sleep and do any tour next day, like Rainbow Mountains.