"Home Sweet Homediddly-Dum-Doodily" is the third episode of Season 7 (originally going to be the first episode of season seven).
After a series of misadventures, the Simpson children are put in the custody of Ned and Maude Flanders. Learning that none of the kids have been baptized, Ned sets up a baptism - which Homer and Marge thwart just in time.
Homer gives Marge a surprise trip to a relaxation center. Despite Marge's warning for them to clean up the mess and give the children fresh clothing before they leave, Homer refuses and willingly abandons their kids under the ineffective care of Grampa. Meanwhile, Bart has gotten lice from Milhouse's monkey, and has to get his clothes burned by Groundskeeper Willie. Also, Lisa gets her prescription shoes stolen by bullies and hung up on telephone wires. They come home wearing bags, finding out that their parents aren't home, and the Child Welfare Agency (prompted by Principal Skinner, who had called them in concern for Bart and Lisa's welfare) has taken offense at the poor conditions of the house (the household chores were simply postponed, but the agency misinterprets such signals as a stack of 20-year-old newspapers obtained for Lisa's history project, and Grampa is sleeping on the family couch, allegedly "in his own filth"). However, as soon as Homer and Marge arrive home, the agents take Bart, Lisa, and Maggie away from their house despite evidence against Homer and Marge being purely circumstantial, as they convinced Marge and Homer to be terrible parents.
The Simpson kids are taken to a foster home - which is right next door at the house of Ned Flanders. The kids have to deal with Flanders' style nachos (cucumbers with cottage cheese), bedtime when there's still daylight, and hours of a game called Bombardment of Bible Questions. Bart and Lisa hate their new life, but Maggie enjoys being there, not just because she is a baby, but also because Ned pays more attention to her than Homer did. Ned allows Bart and Lisa to watch The Itchy & Scratchy Show just one time. However, the violent nature of the show as well as Rod and Todd's discomfort makes Ned ban Bart and Lisa from watching it to their further detest.
Marge berates Homer for having not let her clean up the house before going to the relaxation center or even asking her sisters to help clean house. He defends himself, stating that Patty and Selma makes him uncomfortable wherever they go. Homer then berates Grampa for not alerting them earlier about the Child Welfare Agency that could have given them time to arrive home and clean up the house. Grampa defends himself by stating that it was Homer's own fault for having not listened to Marge in the first place and leaves. She blames herself for doing the spa event with Homer and not cleaning up or giving Maggie adequate care. Homer only blames himself for being unable to help Lisa with school, be a better father to Maggie in ignoring her and he is inept in taking care of things like a houseplant. Homer still blames the mess on Bart because the boy annoys him to no avail with his shenanigans. He stews in anger and decides that he and Marge must plead their case in court. At the Springfield County Court House, they plead their case to get their children back (although Homer initially claims she has the wrong family when she names one of the children as "Margaret" until Marge reminds him that she's Maggie). However, Judge Julie, presiding over the case, tells Homer and Marge that if they want to have their children back, they must attend a Family Care Class and prove that they are fit parents. When Homer tries to interrupt her, Marge warns him against it because they don't want to add a contempt of court charge to their precarious situation and make Child Welfare more convinced that they are horrible parents.
When Ned finds out from Lisa that none of the Simpson children were baptized because of Homer's lack of belief in God and didn't believe that baptism is necessary, he faints. He calls on Reverend Lovejoy for advice, but the annoyed Reverend can't under stand Ned's jabbering and hangs up. Ned takes it upon himself to give the kids a proper baptism, much to Bart and Lisa's fear.
Meanwhile, since there's no way for Homer and Marge to talk to their children (even by the phone), Bart and Lisa help them out by using a newspaper-editing machine that Rod and Todd has and lets Homer and Marge know how much they miss being their parents. With a sense of newfound hope, they take classes to become better parents as they are forced to attend a basic class on home care, including such lessons as putting garbage into garbage cans, and leaving milk either in a refrigerator or in a cool, wet sack. While Homer learns well, Marge is genuinely humiliated as these are things that she already knows. She is concerned that she is struggling to keep herself together. This concern doesn't go unnoticed and the instructor pulls Marge out of the class. Out of sympathy, he asks her why is she struggling to learn. Marge immediately reveals that she is genuinely humiliated by Homer's earlier behavior. He didn't let her clean up the house and give Bart, Lisa and Maggie clean clothes before going to the relaxation center. When they got back home, the Child Welfare Services never give Marge a chance to explain the mess of the house and that the kids are in a loving environment with them. She wants her children back and that she loves them very much. The instructor understands her plight, but maintains the class is just trying to help teach her to be better parents. Although she presumably fails the class, it was revealed that there was a marginal error between the scores and Marge actually passed. Eventually, she and Homer are declared good parents.
When they go to pick up the kids, they see only a note saying "Gone Baptizin'". Homer wonders where they could have gone and, thinking like Flanders, determines they went to the Springfield River, where Ned is about to baptize Bart. Homer arrives at the scene right when Ned is about to sprinkle holy water over Bart's head. Homer pulls Bart over and the holy water falls upon Homer's head instead, baptizing (or burning) him, making him growl in fury. Homer has a moment of grace after his baptism and confuses Ned. He quickly reverts to his old self and angrily reclaims his kids from the Flanders family. Nevertheless, Maggie would rather stay with the Flanders family than with Homer, Bart and Lisa, until Marge appears. Her reluctance disappears when Marge arrives in the sunset to pick her up and resumes being a loving mother to her. The Simpson family is back together again, and they head home together, mocking the old paint cans in Ned's garage. Homer and Marge apologize to Bart and Lisa for what happened, promising that Grampa will never babysit again.