In a parody of Inception, following a traumatic incident, Homer's bed-wetting problem worsens, and his family decide to infiltrate his dreams to get to its subconscious source. And in Homer's dreams is where his late mother Mona Simpson (voiced by Glenn Close) resides.
At the power plant Mr. Smithers forgets to close the office supply room door after a plutonium carbon rod props it open, and Homer squeezes his head in right before Carl closes it. Then, all the employees steal the free supplies, stuff them into their cars, and try to leave before Mr. Burns notices. Homer drives past the gate, which closes on a car, which causes a chain reaction of the cars' trunks opening, up to the back car that Mr Burns notices. He punishes all the employees but Homer in a meeting, and then all the workers give Homer bad karma.
Bart and Homer go fishing the next day, which Homer received off. The next morning, Homer wets his bed and wonders what happened. He feels bad for his friends, and throws a picnic for them where they forgive him. The next day, he wets his bed again, but it's worse. He decides to go to Shameful Eddie's, a superstore that sells embarrassing supplies. That night, Homer turns on the device that detects when he wets the bed. The alarm goes off and wakes Marge and the kids. They go into the room and notice the machine, and laugh.
The night after, Homer and Marge try to make love after Homer tries adult diapers, which Marge doesn't like. The next morning, she takes a walk and Professor Frink gets shot out of his house. He says that he knows about Homer's bed-wetting problem from Twitter, and he offers to help with a device that enters someone's dreams and explore their subconscious. The family agrees to try it.
They first enter Homer's dream, which they are all skiing downhill with Death, who has a coffin with the word "marriage" on it. They speed off a cliff and almost die in the dream, before they switch to another dreamworld. They are in a therapists office, with the coffin there. When they open the coffin, it is full of fish that squeeze them to the ceiling. They enter Lisa's dream, but then exit because it is boring. They enter Homer's Land of Innermost Thoughts and Utmost Desires, where he sees his friend Keggy. They walk down the street, filled with large fast food buildings and a giant Kwik-E-Mart. Then, police come to the Simpsons house and try to unhook the dream machine, which destroys Homer's dream. There are two turning gears that kill everything in the dream.
At the Simpsons' house, they fight for the machine. Then, Death arrives at the gears, takes off his mask, and he is actually Mona Simpson, Homer's mother, who lives on in Homer's dreams. She shows them a memory. In the memory, Mona tells Homer and Grampa to go fishing for dinner. Grampa caught a fish, and they fell in the water and got shipwrecked. He felt guilty that he broke up their parents, and Marge figures out his bed-wetting problem. Then, his mother reassures him and cures him of his problem.
Over the end credits, David Byrne and Glenn Close sing a version of "Dream Operator" from the David Byrne movie True Stories.