Sleeping with the Enemy is the third episode of Season 16.
When Bart gets a perfect score on a state capitals test (thanks to Mrs. Krabappel leaving a map of the USA on the wall for her class to see), the party Marge throws for him is so lame that Marge thinks that Bart and Lisa feel she is "overmothering" them, so she shares her love with someone else - Nelson - resulting in Marge taking Nelson in (and putting him in with Bart) when Nelson's mother leaves him; Lisa plans to lose weight when she realizes how fat her posterior is - from her family, friends, and mirror.
Lisa has a big butt and her friends (Sherri, Terri, and Janey) at her school make her know about it by mocking and teasing her, causing her to become self-conscious about her weight. Homer only makes matters worse when he tells her about the "Simpson butt", something that all Simpsons have. Later, Bart brings home a geography test with a grade of 100, eagerly expecting a party that was promised to him if he ever got a 100. However, Homer thinks Bart forged the test, and is not easily willing to give up. They visit Mrs. Krabappel, who confesses that because she forgot to fold up the map during the test, everyone in the class received a 100. Bart gets his "party", which is attended by Patty and Selma, Grampa (sleeping in an armchair), Grandma Bouvier, Ralph, and Martin. (Milhouse is also there, but only via speakerphone because he has the measles.) Bart doesn't like the party and to make matters worse, Lisa runs up to her room crying when Marge offers her a slice of cake.
Marge thinks that the kids don't appreciate her anymore, so when she finds Nelson eating tadpoles from a fountain in the park, she plans to become a mother figure in his life and spend some quality time with him. She brings Nelson home and pays him to do some chores. Nelson's mother finds out and doesn't want Marge giving them any charity or trying to make him respectable, to which Marge retorts that she should go home to her son and to try to not have intercourse along the way before closing the door. Later that night, Nelson's mother has left town, and Nelson, having nowhere to go, chooses to stay with the Simpsons. Without even asking Bart, Marge lets Nelson sleep in Bart's room, forcing Bart to sleep on the floor, underneath his bed.
When Bart gets offended at Marge for turning him down, she simply treats Nelson better than she has ever treated Bart before. Late one night, Nelson is singing about his long lost father, while Lisa, unable to take any more starvation, is stuffing herself with an entire cake that Homer bought for Lenny. The next day, Nelson helps Lisa get back at Sherri and Terri for teasing her. Nelson unleashes a skunk, which sprays them, while Lisa and the rest of the children point and sing a modified version of "Jingle Bells." The twins are horrified and run off screaming. When Lisa and Nelson return home, they meet Nelson's father, whom Bart found working at a freak show in a circus. It turns out that Nelson's father has really gone to the Kwik-E-Mart (which Nelson has repeatedly stated previously in the series), where he gets a severe allergic reaction from eating a chocolate bar filled with peanuts. Coincidentally, the circus has made a stop in the Kwik-E-Mart parking lot, and found Eddie Muntz, thinking he was some kind of half human, half monkey beast. Nelson's mother finally returns, after going to Hollywood and getting the lead role in Macbeth, playing Lady Macbeth. In the final scene, Homer wants Lisa to say everything is just great, but Lisa does not, because she is still obsessed with her health.