Mr. Krabs is very cranky and has thrown out his back due to his old, lumpy mattress. SpongeBob suggests that he and Squidward buy Mr, Krabs a new mattress, but because he doesn't want to waste his hard earned money on his cheapskate boss, he refuses, so Patrick joins SpongeBob in buying a new mattress instead. The two go to a massive mattress emporium, where they buy a comfortable new mattress throw out his old one.
They make a card for him, which Squidward signs, giving himself full credit for the gift. The next night, the trio surprise Mr. Krabs with his new mattress, and when they tell him that they threw away his old one, he is furious, revealing that all of his money was in the mattress. Krabs then goes into a "Cash Coma", and ends up in the hospital, where the doctor explains that only the return of his money can save his life. Squidward insists that it was SpongeBob's fault, but a police officer shows him the card, which states that he is solely responsible. The cop says that if Krabs dies, Squidward will be charged for his death and sent to jail. Squidward was beginning to threaten to murder SpongeBob, but the police officer stopped him. Squidward, SpongeBob and Patrick go to the dump to retrieve the mattress, only to find that there is a vicious guard worm sleeping on top of it.
Meanwhile, the doctor realizes that Mr. Krabs has no insurance and cannot afford his hospital room, and move him into the hallway in front of the vending machines. Squidward tells SpongeBob and Patrick to go inside and get the mattress, but they end up overturning the fence, trapping Squidward inside with the worm. At the hospital, the doctors "surgically remove" Mr. Krabs from the building and leave him on the sidewalk in order to get to the "Nutty nut bar". Squidward then devises another plan, where SpongeBob and Patrick distract the worm while he retrieves the mattress. The worm becomes obedient to SpongeBob when he sees the wooden spoon he is holding up. SpongeBob throws it towards Squidward for the worm to fetch, and Squidward is subsequently attacked by the worm.
At the hospital, Administrator Flotsam is outraged that Mr. Krabs has been left outside, and they push him down the hill. Next, Squidward has SpongeBob and Patrick dress as "choice cuts" so that the worm will eat them, telling them that they are in Halloween costumes, and that when the worm sees them he will realize that he forgot about Halloween and leave to get candy (which is obviously false). Suddenly, Mr. Krabs rolls into the dump and lands on his old mattress, reviving him. He effortlessly throws the worm aside, which lands in Squidward's arms and begins chasing him.
This episode had the most ironic jokes in it; during Mr. Krab's coma, the doctors repeatedly put him in more difficult situations, each time with the doctors not caring of his well-being. And all of Squidward's schemes that was planned for SpongeBob and Patrick to get hurt, Squidward was hit instead.
Running Gags: Squidward getting attacked by the Guard Worm and Mr. Krabs getting moved around