The Fox network's animated family The Simpsons is getting a plastic makeover, as the creators team up with toy company Lego for an entire episode created out of the plastic building blocks.

The episode, entitled Brick Like Me, will see family patriarch Homer Simpson wake up in a Springfield where everyone and everything is made out of Legos, and he must figure his way out before he gets stuck in the plastic world forever. It airs in the United States on on May 4.

Danish company The Lego Group first started producing the plastic construction building blocks in 1949, which have become a popular toy around the world.

The Simpsons, created by Matt Groening, is the longest-running animated series in the history of US television, making the cartoon family and their catch phrases, such as Homer's "D'Oh!," a facet of American pop culture.

The series, which airs on 21st Century Fox's Fox Television, entered its 25th season last year, and the Lego episode will be its 550th show.

So far, the 25th season has seen a special Halloween episode directed by Mexican filmmaker Guillermo Del Toro, while an upcoming show will cross over with another Groening animated series, Futurama.

The Simpsons has also been renewed for a 26th season, in which producers have teased that one longstanding character will die.

Lego, meanwhile, has become a hot commodity at the box office, with last week's release of The Lego Movie, featuring superheroes and villains in a world made entirely from Lego.