I've found the best exercise for sailing is swimming. I do lots of laps leading up to a long distance event. Swimming works your core (back and abs). Also swimming works mostly your arms and shoulders for endurance activity.
Biking or running are also good.
I don't find weight lifting to be particularly helpful if you can already do the chores on the boat that you need to do. Mostly you are looking to build endurance muscles.
Mike Hill