You should stay overnight to allow yourself some time to visit nearby Herculaneum (or Ercolano in Italian). Herculaneum was also affected by the eruption of Vesuvius. Unlike Pompeii (which was covered in ash), Herculaneum was coated with lava. The excavated site is much smaller than in Pompeii, but the lava allowed for a greater degree of preservation. It is really something else, so you should consider seeing it. My recommendation is to spend the morning of your first day traveling to Pompeii, see the ruins in the afternoon and stroll around town that evening. I stayed at Hotel Forum (99 Via Roma, 39 0818-501170) which was simple but friendly and clean. The next morning head to Herculaneum. You’ll be back on the road to Rome by lunchtime. Buon Viaggio!