Depending on how long you plan on coming up here, you can easily see a lot of Cape Cod and the Vineyard (as its referred to) without an issue. If I were you I would try and see both since you've never been up here. If you have time, I would do Nantucket as well.
The ferry ride over to the Vineyard is not too bad, around 45 minutes. Nantucket is a bit longer at 2 hours.
Check out this site for all the information you would need for schedules, pricing, etc.
https://www1.steamshipauthority.com/
May is a good time to come as the weather is nice and unless you're coming at the end of May, the crowds have not really begun to come in. Generally the busiest time on the Cape and Islands is from the end of May through the beginning of October. One thing to note is that the water may be a little bit on the chilly side since it hasn't had enough time to warm up with the warmer temperatures. You can still swim, it may just be a little cooler than say Florida that time of year.
For where to stay, I would suggest staying somewhere in the middle of Cape Cod since it will allow you more flexibility and make traveling around more reasonable. It's also close to the ferry ports too. A town like Dennis, or Yarmouth would be a good option. The farther out on the Cape you go, the quieter it gets. Truro for example is quieter and less crowded than Falmouth.
The Cape is also split into regions (not on a map, just as locals will refer to it). You have Upper, Middle, Lower and Outer Cape Cape. Upper will include a town like Sandwich, or Falmouth. Middle will include a town like Hyannis, or Dennis. Lower will include a town like Chatham, or Brewster. Outer will include a town like Wellfleet, or Provincetown.
So staying in Middle Cap may be more convenient than staying in Upper, or Outer.
As far as beaches go, this website is great for mapping them all out.
http://www.capeguide.com/beaches.htm There are a lot of them. I personally enjoy the beaches on lower and outer Cape best.