Homer is leaving the Power Plant for the weekend, as he promised Marge to be home for dinner. However, as he is leaving, Mr. Burns asks him for his help to fix a gas leak with a "Safety First" poster, and to measure its level with a plumb bob (a procedure that takes hours to complete).
At home, Marge is having trouble taking care of the kids. She is trying to help Lisa with a school project (dressing her as a male seahorse) and feed Maggie. However, Maggie spills her food all over the room. Bart offers to help clean the mess, but he ends up causing even more of a mess with the chemical products. Frustrated, Marge asks him to go play outside. Bart goes to the Springfield Park, where Martin's mother, Martha, realizes that he is by himself and calls the police. The cops take Bart back home and arrest Marge for neglecting her son just in time for Homer to witness this.
Marge is sentenced to three months in the Springfield Women's Prison. However, she realizes that she could use the time to take a break from the stress of being a homemaker. Meanwhile, Homer is having trouble taking care of the kids, but some Springfield residents (especially Ned) realize that he is going through a difficult phase and decide to help him.
Back at the jail, Marge manages to fit in well. She uses her hair as a weapon against bullies and makes some friends, but Homer hires the Blue-Haired Lawyer, who finds out that Marge couldn't be arrested because of a technicality, and she is set free. However, Marge, not ready to go back to all the responsibilities of being a homemaker, fires a guard's gun and earns two more months inside.
Homer, depressed at Marge's unwillingness to come home, vows to become the perfect homemaker for her sake, imagining a black and white scenario where he is dressed as a woman and Marge in a suit going to her job. Meanwhile, other parents take Marge's position as a warning, and they decide to overprotect their children to the point of each one taking turns to take them all on a walk on leashes. When Homer's turn to walk them goes wrong, the kids have enough of their parents' attitudes and decide to sneak into the park to have fun by themselves. Their fun is ruined by a tornado, which drags them into a tree. Meanwhile, Marge realizes she too misses her family when everything begins to remind her of them, and in her sorrow, accidentally causes a prison break. In the middle of the mayhem, she finds Homer undercover as a prison guard in order to rescue her, they both escape safely as the police are too busy sorting out the disarray caused by the tornado to bother going after them.
They soon arrive back home, where Bart and Lisa become overly attached to her and the entire family ends up hugging inside the closet.