I recognized it from the Justice League cartoon. Although, I was disappointed by this episode because the most important aspect of this story, when it happened to Superman, was that he realized it wasn't real and decided to give up the dream world on his own. It carried more emotional weight. They should have done that in this episode.