So, the phrase "three sheets to the wind".
It comess from the age of sail: a sheet is one of the ropes that holds down the corners of a sail. And if something has gone "to the wind", that means it's flapping free (and dangerously).
However, sails have at most *two* sheets (excepting some early Renaissance ships, which predate the metaphor by about 300 years).
So if you've got three sheets to the wind, you are *really* out of it!