First go here on dmsguild.com, then download The Buccaneer's Bestiary from Aaron "quickleaf" Infante-Levy. It's a PWYW product so pay nothing. Then, after getting it, marvel at one of the best free sourcebooks on DMsguild.com and go back and pay this guy some money because we need more cool books like this!
The Buccaneer's Bestiary provides a DM with a wealth of impressive content, including dozens of amazing encounter and event charts, a wealth of thematic foes, and so many cool ideas that it's impossible not to feel inspired by this book. The setting is "Dark Caribbean" with the idea being you can meld D&D elements with a grim and fantastical version of the piratical Caribbean, and this book really pulls it off. Even if you don't go for a quasi historical setting, the BB will provide plenty of material for forging your own fantasy piracy campaign of choice. I'm already plotting how to use this in my ongoing D&D Lingusia setting, which has a "Age of Exploration" period this book would compliment perfectly.
When you're done marveling at the resource above, take a look at the equally impressive PWYW tome called Blackpowder Pirates, a tome written by David Adams which happens to be an excellent player's resource for the kind of campaigns that The Buccaneer's Bestiary evokes. The sourcebook includes a buccaneer archetype for fighters, a dread pirate option for gunslingers (the Gunslinger is also a good addition, by the way), freebooter rogues, and warlocks with the Pact of the Compass (yes, it might sound a tad familiar to you).
If you're looking for some seafaring piracy in your D&D 5E games, and you want some excellent resources to make it happen, download these books and get to it!