Many a true word is spoken in jest
A literal meaning; that the truth is often found in comic utterances.
The first author to express this thought in English was probably Geoffrey Chaucer. He included it in The Cook's Tale, 1390:
But yet I pray thee be not wroth for game; [don't be angry with my jesting]
A man may say full sooth [the truth] in game and play.
Shakespeare later came closer to our contemporary version of the expression, in King Lear, 1605:
Jesters do oft prove prophets.