Hitching rides on yachts is possible but not to be relied on. Your chances are best if you have sailing experience and contacts in the yachting community. Private yachts usually follow common routes across seas where anchorages are safe and the scenery is agreeable.
It’s possible to get a working passage or catch a free lift (though people may request from 10 to 30$ per day to cover your food and drinks).
Where and When:
The 3 big regions for sailing are Mediterranean from June to September, Caribbean from October to May, South Pacific from November to February. Best periods to find a ride for crossing the Atlantic are: May from Caribbean to Mediterranean and September for the opposite.