The phrase "three sheets to the wind" does indeed come from the world of seafaring, specifically sailing ships. The "sheets" in the phrase are not sails, but ropes. Of course, the first thing one learns about ropes once aboard ship is that they are never called "ropes." (Sounds a little like *learning the ropes*, eh?)They are named according to their particular function: halyards (which move or hold things, usually sails, vertically), sheets (which move or hold things horizontally), and lines (which hold things in a static position). The sheets in this case are those ropes which hold the sails in place. If one sheet is loose, the sail will flap in the wind and the ship's progress will be unsteady. Two sheets loose ("in the wind"), and you have a major problem, and with "three sheets in the wind," the ship reels like a drunken sailor.
The specific number of "three sheets" in the phrase wasn't random, by the way -- there was, at one time, a sort of rating system of inebriation among sailors, where "one sheet" meant "tipsy" and so on, up to "four sheets in the wind," meaning to be completely unconscious.
http://www.word-detective.com/back-p.html