Happy as a clam is a portion of a phrase quite commonly used in the US in the early 19th century. It even made it into the poetry of John G. Saxe, who wrote Sonnet to a Clam and waxed poetic about the secure state of clams when they are immersed completely in water. Happy as a clam is only a portion of the phrase, and the full phrase should be “happy as a clam in high water,” or at high tide.
Anyone who has ever hunted for clams knows they must be dug when the tide is low. They’re almost impossible to find in high tide, and it would be dangerous to venture too far out into deep water. Thus a clam can said to be quite happy at high tide, since it’s in no danger, at least from humans, of being made into a meal.
via Where Did the Saying “Happy as a Clam” Come From?.