The episode opens with Mr. Krabs writing on the Krusty Krab's "open" sign. Krabs notices that Plankton has updated his own time, with the Chum Bucket restaurant now open 23 hours. Mr. Krabs, as always wanting to be better than Plankton, decides to open the Krusty Krab for 24 hours (forever). Squidward is naturally unhappy with this decision, but SpongeBob breaks through the wall to express his happiness to be working nonstop.
Over in the Chum Bucket, Plankton is very happy. He knew all along that Krabs could not resist staying open later than him. This is all part of his evil plan, which he thinks is working perfectly. Plankton thinks Krabs will run his employees into the ground, and that SpongeBob's mind will crack from exhaustion and be vulnerable to to tell Plankton the secret Krabby Patty formula. Plankton laughs evilly for a while, then notices that Karen is oddly not laughing with him. Plankton asks her why she is not laughing, and she reveals that she thinks his plan is flawed so much that it is a joke. Plankton disregards her comment (but will find out later that she was right). In the Krusty Krab, SpongeBob is working making Krabby Patties as he normally does, but is not getting tired.
Plankton, disguised as a sea spider, sees that SpongeBob is not getting exhausted. Plankton decides to phone Mr. Krabs and place an order of 10,000 Krabby Patties under the name "Peter Lankton" (P. Lankton). Mr. Krabs is suspicious at first but will do anything for money and accepts the order. SpongeBob receives the order and is his happy self at first. But he will have to sacrifice much time to this order. As over a month passes, Mr. Krabs, Squidward, and SpongeBob are starting to look overly fatigued from their lack of sleep/rest. SpongeBob has no energy to continue making the Krabby Patties and is motionless at the grill. Once woken up out of his trance, SpongeBob starts to hallucinate and view everyone as giant Krabby Patties. SpongeBob later starts to believe all of the large Krabby Patties are killer Krabby Patties due to an odd sound they make to him.
SpongeBob and Mr. Krabs receive a flyer for "Dr. Peter Lankton. Psychiatrist Specializing in Krabby Patty-Phobias." Mr. Krabs says SpongeBob needs to go there to get killer Krabby Patties off his mind. He enters the place (which is actually the Chum Bucket in disguise), and meets Plankton there who is disguised as a psychiatrist. SpongeBob tells Plankton about what his problem is, and Plankton tells him that they are going to do some exercises. First, Plankton tells SpongeBob to close his eyes and think of Krabby Patties. Planktons asks him "What are they made out of?" SpongeBob answers, "Hatred." He freaks out and crushes Plankton with a piano, of which Plankton is confused about, as he does not have a piano. Next, Plankton says something and SpongeBob is supposed to say the first word that comes to mind. When SpongeBob keeps saying the same words Plankton says, Plankton tells him that he has to say something different from what he says.
Plankton says "Potato", to which SpongeBob says "Po-tah-to." Plankton says "Tomato", to which SpongeBob says "To-mah-to." Plankton realizes his flawed exercise and is angry at SB.
Next exercise: SpongeBob must put a bunch of cards (that have common kitchen ingredients on them) together in any order he chooses. For example: a secret formula. SpongeBob arranges the pieces into the shape of a piano, and then it falls over and crushes Plankton. Later, Plankton decides to use hypnosis. The trick is to make SpongeBob fall asleep and when Plankton snaps his fingers, he wakes up and tells him the formula. SpongeBob falls asleep, but when Plankton snaps his fingers, Cymbals Trumpet and Drum! he doesn't wake up. In SpongeBob's dream, he is jellyfishing when a giant Krabby Patty eats him. Then, he's in bed when a giant Krabby Patty enters the room. The Krabby Patty turns out to be friendly and gives SpongeBob a cookie-pizza and chocolate milk. SpongeBob wakes up and says he is cured, and Plankton's plan has failed. SpongeBob thinks his newfound health is all due to Dr. Peter Lankton, but in reality he just needed some sleep and to realize his love for patties again.