I'm in the minority in this forum as a frequent traveler to Italy who happens to purchase train tickets in advance just about all of the time. That said, for the short segment, you're probably going to be fine. If you really wanted to, you could buy ahead on a fare that lets you change trains in case you're running early or late. That's what I normally do. It's overkill, but honestly when I'm coming off of an overnight flight, the last thing I want to do is wait any longer for a transfer than I need to, so I do it for peace of mind.