Explain to the players your limitations
If it's the beginning of the session when the players propose Let's go sailing, you as the DM are allowed to say, "Wait! I haven't prepared for that. How about doing that next week and sticking with the plot this session?"
Experienced players especially should be understanding about this. First, some of them may have DMed before, and they'll know that even the most diligent and well prepared DM isn't prepared for everything. Further, they may believe (whether or not it's true) that straying from the DM's preferred plot is a good way to irritate the DM, and irritating the DM—like crossing the streams—is bad.
New players may be less understanding, wondering why, with all those books, you can't just whip something up. That requires explaining that you've worked on this—the preferred plot—and they're doing that—something you've not expected (like opting to go sailing). Explain that your campaign world isn't a fully populated sandbox where doing anything is an option right now but an unfinished masterpiece that must be adapted to the PCs' choices. If the players want to make choices other than obvious ones, that's totally fine, but you—the DM—must have the same opportunity to prepare for those choices.
If the players demand their PC go sailing anyway, that's weird (so weird, in fact, this fellow DM wonders why you'd continue DMing for such a group unless they were close friends or family), and you've a choice: either make up stuff or cancel the remainder of the RPG session and play board games or watch a film.
Likely the only viable strategy between these two extremes is stonewalling: close the port or destroy all vessels with a freak storm, demand every interaction between PCs and NPCs be role-played, have red tape like union membership or licenses prevent ships from taking on new crew, make religious law forbid outsiders from taking part in ocean voyages, and so on. Frequent use of such tactics will build you a reputation as a railroading DM, but occasional use of such tactics are another (very specialized yet often annoying and clumsy) tool in your DM toolbox.
If it's instead the end of the session and you're running a sandbox that allows the PCs to do whatever they want, then adjust your expectations. Have the plot you'd originally prepared continue to occur in the background while the PCs ignore it and peruse a different seaborne plot that you develop between sessions. I know that's rough, but that happens sometimes: you bait the hook and the players don't bite. (It's a good idea to design your sandbox with multiple plots anyway.)
Note that this DM builds into his sandbox plots the contingency What if the PCs don't get involved? and you should do the same: This can mean Armageddon, but uninvolved PCs could instead mean the PCs see in 3 months another group of adventurers who did subvert that original plot and from it reaped the treasure and glory that could've been theirs, or uninvolved PCs could mean that when the PCs return to port they find the city overrun by beholders… or worse.
Note: As an aside, for my campaigns that meet once per weekly, I send an email (usually about 20 words) to the players reminding them to attend and asking if anyone's planning anything unusual for the upcoming session so that I can prepare for it. I urge any DM to do the same.