Although the episode, called 'The Book Job', will not air for another year, Gaiman reports that he went to Los Angeles this week to record his dialogue. The toughest part of this experience, he said, was getting the accent right, since he was asked to "do an American accent that would sound to Americans like Dick Van Dyke's English accent sounded to you".

A turn playing "yourself" on this gentle satire of American family life has become one of the badges of global fame in recent years, with film and pop stars – not to mention politicians such as Tony Blair – queuing up to visit Homer, Marge, Bart and Lisa in their two-dimensional midwestern home.

The list of writers so honoured is rather smaller. The famously publicity-shy Pynchon gave voice to a version of himself wearing a paper bag over his head; Updike played a ghost writer to Krusty the Clown. Other authors to appear have included Gore Vidal, Jonathan Franzen, Tom Wolfe, Stephen King, JK Rowling and Stephen Jay Gould. The creator of the Simpsons, Matt Groening, began his career as a cartoonist, and the series has previously made tips of the hat to the graphic novelists Alan Moore, Daniel Clowes and Art Spiegelman, who appeared together in an episode called Husbands and Knives.

Strangely enough, The Simpsons will not be Gaiman's first outing as an animated character. He appeared last year in the US children's TV cartoon Arthur. The Simpsons appearance, however, will be a "very different version of myself", according to his blog. "For a start, I do not appear in anyone's falafel. Also, I expect I will be yellow."

Gaiman, who is also the screenwriter of a forthcoming episode of Dr Who, added that he "still hopes to be a head in a jar on Futurama one day".