Our Bassett Hound, after one weekend aboard, discovered on his own that sleeping on the cockpit sole was his best bet. When we tack, he just maneuvers to the other side and resumes his nap.
Cannot over stress the importance of the life jacket mentioned by other respondents. Our guy used to enjoy reclining on the cockpit seat next to the helmsperson until one day, on a particularly windy tack, he was launched through the stern rail and into the drink. The flourescent orange jacket made it easy to keep him in sight and provided us with an excellent opportunity for our DOB procedures.