1894, "anyone of a relationship not natural," abstracted from father-in-law, etc.
The position of the 'in-laws' (a happy phrase which is attributed ... to her Majesty, than whom no one can be better acquainted with the article) is often not very apt to promote happiness. [Blackwood's Magazine, 1894]
The earliest recorded use of the formation is in brother-in-law (13c.); the law is Canon Law, which defines degrees of relationship within which marriage is prohibited. Thus the word originally had a more narrow application; its general extension to more distant relatives of one's spouse is, according to OED "recent colloquial or journalistic phraseology." Middle English inlaue (13c.) meant "one within or restored to the protection and benefit of the law" (opposite of an outlaw), from a verb inlauen, from Old English inlagian "reverse sentence of outlawry."
1856, from phrase to speak with one's tongue in one's cheek "to speak insincerely" (1748), suggestive of sly irony or humorous insincerity, perhaps a stage trick to convey irony to the audience.
Hem! Pray, Sir, said he to the Bard, after thrusting his Tongue into a Corner of his Cheek, and rolling his Eyes at Miss Willis, (Tricks which he had caught by endeavouring to take off a celebrated Comedian) were these fine Tragedies of yours ever acted? [anonymous, "Emily, or the History of a Natural Daughter," 1761]
This arietta, however, she no sooner began to perform, than he and the justice fell asleep ; but the moment she ceased playing, the knight waked snorting, and exclaimed,—'O cara! what d'ye think, gentlemen? Will you talk any more of your Pargolesi and your Corelli ?'—At the same time, he thrust his tongue in one cheek, and leered with one eye at the doctor and me, who sat on his left hand—He concluded the pantomime with a loud laugh, which he could command at all times extempore. [Smollett, "The Expedition of Humphrey Clinker," 1771]