There are two versions of the story as to why a pig and chicken will prevent a sailor from drowning. The first is just that pigs and chickens do not like water, so they would like to be out of the water as soon as possible. A slightly more plausible explanation is that pigs and chickens were often carried on deck in wooden pens. In a shipwreck the pens would often wash ashore with the other debris from the ship. Pigs and chickens were at times th only survivors of ship wrecks. A more prosaic explanation was that having a pig and chicken tattoo would guarantee that a sailor eats well as he carries his hams and eggs with him at all times.
One variation was to have a tattoo of a pig on the left knee and a rooster (cock) on the right foot signified “Pig on the knee, safety at sea. A cock on the right, never lose a fight.”