COCKPIT - An opening in the deck from which the boat is handled.
THREE SHEETS TO THE WIND -
On a small boat there are three sheets that control the sails. The Main Sheet controls the mainsail, and two sheets that control the headsail the Windward Sheet and the Leeward Sheet. So a person that has three sheets to the wind means that the sheets are flying with the wind i.e. you do not have control of the boat. Much like someone who has three sheets to the wind does not have control over themselves.
[Ibid.]