I'm a homebrewer and a sailor (USCG 100-Ton, ASA Instructor Evaluator, charter captain, cruiser, ...) and I used to crew on a barque rigged ship named the ELISSA. There are a number of conjectures about the origins of the "Three Sheets..." expression, but none I know of which have been proven to be the definitive answer. The "traditional" (tall ship) sailing community loves to debate the origin of such terms in great detail ad-nauseum (I would rather be sailing).
This would be a lot easier to explain, and comprehend, with a diagram, but here goes...
One such conjecture, of tall ship origin, has to do with the "head sails" -- those are the sails rigged the furthest forward on the the ship (these BTW are "fore-and-aft" rigged sails not "square sails"). On some types of sailing rigs, a "barque" rig included, there are three such head sails. Each is controlled by its own set of "sheets"....the proverbial "three sheets". When sailing at a relatively narrow angle to wind, the sheets on the "leeward" side (down-wind side) of the vessel will be hauled in tight (these loaded sheets are called the "working" sheets). In this configuration, these sails, and sheets, slightly over lap each other. If the boat is sailed at too narrow of an angle to the wind, the sails, starting with the forward most sail, will begin to "luff" (flap in the wind), if you continue to bring the boat even "closer" (narrower angle) to the wind, each sail in turn will begin to luff. If you continue turning, so that the "bow" (front) of the boat passes through the wind, and the wind is now on the same side as the "working" sheets the sails will become "back winded" (the wind is on the "wrong" or "back" side) and....the "working" sheets will now be on the windward side of the boat...or so to speak "...to the wind...". Thus, this attitude, could be described as "Three Sheets to the Wind". This is not normally a desirable sailing attitude, and sometimes occurs due to the "helmsman" (the person steering the boat) not being sufficiently attentive to his duty...which could of course be because he is drunk AKA "Three Sheets to The Wind".
In the attached picture of the ELISSA you can clearly see the three "head sails" in proper "trim" ie: not "...three sheets to the wind..".
This all ties back to beer of course, because he could have been dipping into the historically significant cargo of "IPA".
If you want to try this theory out then pick up a case or two of "ELISSA IPA" produced by St Arnold Brewing Company of Austin, TX. A portion of the sales go to support the good ship ELISSA. They make a lot of other tasty brews too. The idea for this product was originated by home brewers who were members of the crew of the ELISSA....and of course would never get "Three Sheets to The Wind" except while on "shore leave".
See
http://www.saintarnold.com/beers/elissa.html for more on ELISSA IPA.
For more on the ELISSA see
http://www.galvestonhistory.org/Texas_Seaport_Museum.asp.
See it all ties neatly together...drunken sailors and beer!