that is a formidable task and will be exhausting. I think you should leave off long island given the horrific traffic found there. RI-ME is doable. Also, the odds of getting 5 days of rideable surf in all those locales is pretty unlikely. Good luck though.
if it was me, I would keep an eye on the forecast, and go to where looks best. And, if you are lucky, you could catch a swell in Rhode Island one day, and then head up to northern new england the next day, and surf around the NH/ME area.
Here are some suggestions on where to look for surf up North.
Long Island: Montauk - Surf looks to be good there and can handle very big surf 15ft plus, try near Rockaway Beach and north for good NE Swells Rhode Island: Narragansett - fun break, Judith Point - great spot but can get very big and watch out for the rocks. Mass: Cape Cod - is cool place to surf, not sure where I surfed at, just off some park where the high dunes are, watch out for whales and great whites. New Hamp: Never been there and I know nothing of the place other than it gets very cold. Maine: Never been there and I know nothing of the place other than it gets very cold.