Homer wakes up at the Power Plant to an alarm, where he accidentally causes an electrical explosion at his desk. He falls back asleep while the fire is extinguished. He is taken to Springfield General Hospital, where Dr. Hibbert discovers Homer has narcolepsy, a sleeping sickness. He receives a medical note, which he uses to excuse himself from performing daily tasks. Dr. Hibbert contacts Marge to ask Homer to get some medication, which he goes to collect. When queuing to collect his medication, Homer complains about waiting in line, before falling asleep on the floor. He returns home later that night without any medication and Marge can smell that Homer has been out drinking. After Marge complains at Homer, the couple agree they should go to see a therapist. The therapist says that Homer and Marge's relationship is falling apart and that the best option for them is separation, which could lead to divorce if things don't improve. Marge, frustrated with the sleeping Homer, agrees and tells him to leave for the time being. Homer packs his bags, and prepares to leave the family. Lisa is confused as to why her father is leaving, so Marge tells the kids that she and Homer are splitting up, and she is unsure when or if she will let him return. After Homer drives off, crying, he sleeps over at the Springfield Nuclear Power Plant, hoping that Marge will forgive him soon like she did after previous break-ups. However, Lenny learns that Marge has changed her social media relationship status to "it's complicated". Homer then calls Marge, to discover on her voicemail she has reverted to her maiden name, Bouvier.
After visiting Moe's Tavern, Homer goes to collect his medication, and meets a female pharmacist named Candace who agrees to go out with him, and they later spend the night together. Homer wakes up the next morning, worried about his marriage to Marge, and tries to call home to speak to her. He speaks to Selma, who reveals that Marge is preparing to go on a date. Homer goes with Candace, to meet her friends, who spend time together at a coffee shop. Candace's friends joke with her, pondering why she is dating Homer. He reminds her of a snowman, to which Homer comments that he'd like to be 'back in snowman shape'. They both get tattoos which they show to Moe. Candace wants Homer to meet her father, and they go out for a meal. Candace's father, Roger, tells Homer not to worry about the age difference between him and Candace, revealing he has been dating a younger woman. Marge enters the restaurant, and she is in shock to see Homer is there, while he and Candace are appalled to see that she's Roger's date and that Roger has been spending time with Bart, Lisa and Maggie. Roger apologies to Candace for not being there for her, before he proposes to Marge. Marge agrees to marry Roger after the divorce is finalized. Candace suggests Homer should marry her, revealing she is pregnant with his child.
Homer wakes up at the therapist's office sitting next to Marge. Homer is relieved to discover it was only a dream, and he and Marge are still together. Homer tells the therapist how she should not have suggested that he break up with Marge, but the therapist admits she did not tell them to break up. Homer makes a promise to try and behave for the next month, in an attempt to stay with Marge. After proposing to spend February on Homer's behavioral improvement, they agree on March. By March 31, the family see an improvement in Homer. Lisa is now eating meat, and Maggie can now talk. She sings "What a Wonderful World" with Homer confused by this, only to wake up in a bar alongside Candace, who hits him with a bottle of beer to wake him up. Homer runs to his family home to see Roger has taken Homer's place at the family dinner table. The family look happy, and Homer walks away, sobbing. Lisa walks out to see Homer, who comforts him, and they hug each other. Lisa is called back indoors by Roger after he mentions pony shopping and tells Homer "I'll Skype you at Christmas". Homer cries out loudly. Marge wakes up in bed, alongside a snoring Homer, and is shocked to discover this was her dream, and wonders if it meant something about her marriage to Homer. They visit the therapist who is about to talk through a solution.
The camera pans out to reveal a tattoo of the entire scene on the back of Hannah Horvath from Girls. When asked what the tattoo meant by her lover, she says it means 'never get drunk in Brooklyn'.