Rome Termini railway station opens at 4 am and closes after the last train of the day has arrived. Unless there are delays, this is around 1 am.