I think you mean "Homer the Heretic". If not though, could you please explain in another way what you mean?
I think you mean Thank God It's Doomsday
It sounds like you're referring to the "Powers of Ten parody" couch gag. It's actually seen in three episodes:
- "The Ziff Who Came to Dinner"
- "On a Clear Day I Can't See My Sister"
- "Eternal Moonshine of the Simpson Mind"