Where does the phrase “with tongue in cheek” come from and What does it mean?

This is something I’d like to see, or hear.

Just how one can accomplish such a gymnastic lingual feat of lodging the tip or other portion of the tongue against the cheek and then uttering any distinguishable word is beyond my imagination. I can’t do it.

The English humorist, Richard Barham, seems to have dreamed up the feat.

In The Ingoldsby Legends (1845), in the story of the “Black Mousquetaire,” he has a Frenchman saying, ” ‘Superbe!—Magnifiquer (With his tongue in his cheek.)” Perhaps that explains why I could never work up an interest in The Ingoldsby Legends.

Other writers, however, have taken up the expression.

Thus we have so eminent a writer as Matthew Arnold, in Culture and Anarchy (1869), saying, “He unquestionably knows that he is talking claptrap, and, so to say, puts his tongue in his cheek.”

From this we infer that the one so performing engages in irony or insincerity.