 Writer Richard Appel pitched "The Two Mrs. Nahasapeemapetilons" at a story retreat several years before the ninth season, but it could not be fitted into a season at that point. Mike Scully liked the idea and so decided to use it in his first season as showrunner. Homer's subplot at the Retirement Castle was an idea that Scully had for a long time. The plot could not be sustained for a whole episode, so it was fitted into this one.
