Obviously nautical terms both, the standard reference book "Brewer's Dictionary of Phrase and Fable" does not have a specific origin for the phrase "Shiver my timbers". It was used in Robert Louis Stevenson's "Treasure Island"... but only three times. The standard meaning is related to the quaking, swaying or other wishe "shivering" of a wooden sailing ship's mast when sailing in heavy seas or perhaps running aground. Often seen in alternate form as "Shiver ME Timbers".
You're "ten" sheets to the wind is more likely the standard "three" sheets to the wind. Our friends at Phrase Finder clarify for the landlubber, that "sheets" are not sails as one intutievely expects, but, rather, ropes or chains, especially the ones connected to the lower corners of the sails to hold them in position to "sail" full of air. If three sheets are loose and blowing about in the wind then the boat will lurch about like a drunken sailor.
Further "... The earliest printed citation is Pierce Egan Real life in London, 1821:
"Old Wax and Bristles is about three sheets in the wind."
The earliest that makes the association with drunkenness is Richard Dana Jr's Two Years Before the Mast, 1840:
"He seldom went up to the town without coming down 'three sheets in the wind'."