We've taken the train from Rome to Sorrento and explored Amalfi/Capri towns and beaches, so that might be an option. Easier to see Pompeii as a day trip from Sorrento as well.
For an option closer to Rome -- this past summer, we spent a few days at this hotel:
https://www.tripadvisor.com/Hotel_Review-g187790-d286440-Reviews-Grand_Hotel_Le_Rocce-Gaeta_Province_of_Latina_Lazio.html
looks like their official website is under construction. Beach was private -- small/rocky, but gorgeous as were the hotel grounds. It is built into the cliffside, so many terraces and stairs. Rooms were comfortable, but not super fancy. Hotel restaurant was great for breakfast and dinner. There is also a pool and another terrace restaurant that had lunch/drinks.
Train to/from Rome was a little over an hour.