"Midnight Rx" is the sixth episode of Season 16. It aired on January 16, 2005.
When Mr. Burns cancels the plant employees' prescription drug plan, Homer chooses to get cheap prescription drugs from Canada (with forged Canadian ID papers), only for Grampa, Ned, and Apu to join him on a second trip, which is not as successful as the first; however, when Smithers is at the brink of death because of a thyroid condition, Burns decides to finance one final run (it's easier than teaching someone new the filing system) with the help of his plane, "The Plywood Pelican."
Mr. Burns reserves the Springfield Air and Space Museum for a plant company party. While there, Burns acts strangely kind to all of his employees. At the end of the party, Burns announces that he will terminate the prescription drug plan. The workers chase after him, but Burns is able to escape in a wacky flying machine, based on the Pitts Sky Car. At home, the Simpsons try to figure out how they can afford new prescription drugs. Homer plans to get another job, but he can not have his choice of starring on Friends as Rachel’s Irish cousin, Seamus (due to the show ending and being taken off the air), and is unable to get a new job. Other companies follow Burns's lead and all prescription drug plans are cancelled. Marge and Lisa go to the pharmaceutical company to voice their concerns but are ultimately ignored.
At the retirement home, all prescription drugs are unaffordable and the staff decide to let the old folks go cold turkey. Grampa Simpson comes up with a plan to get more drugs for Springfield. He and Homer go to Winnipeg, Manitoba, and with help from one of Grampa's Canadian friends, they are able to get unlimited access to the drugs they need. They take them back into the United States and are praised in Springfield as heroes. Later, as Grampa and Homer plan to do more smuggling trips in order to give more support for the town, Apu and Ned ask if they can tag along with them, stating that their children are desperate to get their medicine. Homer accepts and allows them on the trip, even though Ned tries to convert Apu on the way (despite the fact he claims to be sarcastically congratulating him on his bravery of worshiping an idol). Ned even meets his Canadian counterpart, but takes an instant dislike to him when he offers Ned a "reeferino." A coffee accident fools a border guard into thinking Apu is 'expressing his faith' as a Muslim (despite being Hindu), causing the whole border patrol to hold the men at gunpoint. Homer tries to pacify the situation, but unfortunately, he accidentally slips out a large amount of pills on the pavement while opening the door, exposing their smuggling. As a result, Homer and his buddies are arrested, but soon let go and banned from ever coming back to Canada.
Meanwhile, Smithers' thyroid becomes a goiter as he can no longer afford the medicine he needs that was provided under the drug plan. Burns vows to help him so he takes Homer and Grampa along in his plane, the "Plywood Pelican," which he built for Nazi Germany. After getting the drugs, while flying back to Springfield, the plane loses altitude and Burns jumps off with Homer and Grampa's parachutes as they are "gifts" for his nephews. They crash land in Springfield Town Square, almost crushing Chief Wiggum's squad car. Wiggum arrests Homer and Grampa but the people of Springfield protest, as their smuggling has gotten them the medicine they need. Seeing how much they had been helping for the whole town, Wiggum lets them go free. In the meantime, Smithers is saved with a kiss from Mr. Burns after receiving his medicine, and Burns, feeling very remorseful, chooses to bring back the drug plan to all his full-time employees, much to their delight. Homer gets a new job with Burns as a "freelance consultant" and then wonders what the lump on his neck is.