Three sheets to the wind (Very drunk)
On board a sailing ship, a sheet is a rope fastened to the bottom of a sail which is pulled in, or let out, to expand the sail or to change direction. If the sheet is left free, the sail will flap about and the ship will not be under control.
A sheet and sail in this condition are said to be "in the wind". The more sails there are in the wind, the more unstable the ship; like a drunken sailor, in fact.