The Simpsons has been working on the episode for the past two years, according to TV Guide, with the half hour going out in America on 4 May.
"The LEGO brand is all about creativity and imagination. We respect that in others," Jill Wilfert, the LEGO group's vice president of licensing and entertainment, told TV Guide about working with The Simpsons to create the episode and the story.
Not in the article - but interestingly, The LEGO Movie of earlier this year proved extremely popular, was remarkably clever and was very creatively done.
Although The Simpsons wouldn't have know it when the episode was greenlit two years ago, the show about the yellow American family living in Springfield which skews current popular culture, is once again right on the money, doing a satirical homage to something everyone knows in a story which will surely be very clever.
Back to the article and according to TV Guide it was LEGO who approached the show a few years ago and suggested that The Simpsons use LEGO as one episode's opening sequence - the opening title theme which always has a slightly different ending.
The Simpsons said: "Forget the couch; let's do an entire episode!"
In hindsight, their foresight is/was once again sheer creative brilliance.