Mr. Krabs kept his money there and slept on it for a long time. Years later, his back is not in a good state because his mattress is "lumpy." When SpongeBob finds out, he finds a new mattress for him and replaces the old one.
When Mr. Krabs tries it out, he falls fast asleep, but when he finds out that Squidward threw his old mattress in the dump, he is not pleased. He faints and goes into a "cash coma," so there is no choice but to retrieve it.