What are the genesis and meaning of the phrase three sheets to the wind?

The phrase, which has come to refer to a completely inebriated person, derives from sailing, but not from the sails, as one might think.

In the early 1800s, chains were used to regulate the angle of the sails, and these were called sheets.

When the sheets were loose, the boat would become unstable and “tipsy,” thereby resembling a drunk person.