As a quick overview of the TV show Mr. Peabody, a dog, had as an "assistant" a boy named Sherman. Together they would travel back in time via the "Wayback Machine" visiting improbable historical events. The shows would always end up with a "groaning" pun.
(Before presenting the history here, the premise of a "dog who owned a boy", as it were, also was the theme of the movie "A Boy and His Dog" - starring Don Johnson (TV's 'Miami Vice') in his first starring role. CAUTION: This is NOT a movie for children.)
At the end of this offering is a video, actually two, showing episodes of Mr. Peabody, Sherman, and the Wayback Machine.
The cartoon owed quite a bit to a series of vignettes that appeared in the 1950s and '60s in The Magazine of Fantasy and Science Fiction. "Through Time and Space with Ferdinand Feghoot", by "Grendel Briarton" (a pseudonym — and anagram — of author Reginald Bretnor) placed its hero in a wide variety of historical and science-fictional settings, usually as an excuse to deliver a pun at the end. Take away the futuristic settings and add a dog and his boy, and Feghoot becomes Peabody.
An example (in summary form) of one of the original "Feghoot" stories is:
At one point, the Illustrious Feghoot was called in to help a struggling humanoid race on Phi-Omega 9. Their problem was desperate indeed. You see, virtually all of the landmass of the planet was composed of a series of very high mesas and plateaus. The rain, rather than falling on the top of the plateaus, would be expended on the sides. This made farming virtually impossible, so the hapless humanoids were trapped in the Stone Age, neither able to farm effectively nor develop the technology to irrigate the high mesas.
Of course, the poor aliens called upon Ferdinand Feghoot, the illustrious time traveler and philanthropist, to aid them.
Upon arriving, Feghoot looked over the situation and immediately hit upon a solution. He instructed the aliens to dig a trench up the side of the closest plateau, and sent off to Earth for 90 tons of dill pickles. Once the aliens had ceased digging, Feghoot had them lay the dill pickles side by side, end to end, along the entire length of the trench. Immediately the water began to flow up the trench and onto the plateau.
The aliens were astounded. "We knew you were a brilliant man, but this is beyond our wildest dreams. We do not understand, though, why the water flows uphill simply because of the presence of pickled cucumbers. What makes this amazing thing occur?"
Feghoot, with a condescending but genial air, replied, "Simple, my boy. We've known it on Earth for centuries. Indeed, every school child knows that, 'dill waters run steep' "- or, a pun on 'still waters run deep', of course.
Many authors have used the "end it with a pun" ploy. For example, in "A Loint of Paw", a vignette by Isaac Asimov, first published in The Magazine of Fantasy & Science Fiction in August 1957 used the ploy. It was reprinted in the 1968 collection Asimov's Mysteries and the 1986 collection The Best Science Fiction of Isaac Asimov. The title of the story is a play on the words "a point of law", which alludes to the punchline of the story also being a pun. Asimov's author's note states that he considers "a play on words the noblest form of wit." In this story about a guy named Monty Stein, Asimov ends his story with: "A niche in time saves Stein." - or a play on the ole "A stitch in time saves nine". Stories and jokes that end with a pun have become known as "Feghoots".