I often pull up sore and I find this protocol is ideal:
Drink electrolyte sports drink before, during and after sailing.
Stop sailing before you're really exhausted (this is the hard one!)
Stay warm during and after sailing especially on the drive home
Take a couple of nurofen after sailing
Have a hot shower and do stretches
Have a nap after the shower if time allows
I must be getting really old!

Unfortunately having to prepare dinner for the family usually prevents the last two happening at the optimal time!