Sounds like a few potential things. Dog is bored, wants to play. Dog should get plenty of exercise every day so it feels less frustrated and bored. Of course some dogs have a ton of energy so may do it anyway.
Get the dog its own bed and teach him to lay down and stay on his own bed that can be put near to but not on your bed. Dog should know sit and stay commands. If you have not taught the dog basic commands, then it is no surprise that other commands go unheeded as well. Dog and you may need some basic obedience training. My dogs all know that when I say "HEY!" that this is not playtime. If the dog thinks your commands are just silly playtime statements, then most likely the dog is not used to listening to you and is not taking you seriously. This is most likely an issue that goes beyond just the bed to basic relation of dog thinking you are friend and playmate but not packleader.
Also consider this, dog is doing this because dog is getting some fun out of it. Your current responses are fun for the dog and so the dog keeps trying to illicit this fun behavior from you. You have to make sure you are not entertaining your dog when it does unwanted behaviors! For some dogs, it may even be as simple as taking your dog out the door and closing the dog out every time it does something unwanted. You must be very consistant though and Ignore the dog COMPLETELY if it whines or scratches at the door and assuming the dog is not overly destructive to the door such that you are forced to intervene for monitary reasons, most dogs will soon learn that the a behavior is causing unpleasant consequences of being locked out and so will quit it.
A lot does depend on your dog and how spaz, stubborn, smart, sneaky, bored it is and how smart, stubborn, sneaky, diligent, consistant you and rest of family are. If the dog spends more time outthinking you, is more consistant, tries harder, has too much energy, has nothing better to do, and/or wins a lot, then you are not going to win many battles and so a lot depends on how the two of you interact and all these factors. Remember that dogs are a lot smarter than many give them credit. If they are doing something, most likely, they are doing it because they are getting some kind of reward or release from it. If you want them to stop, then at minimum, you will need to remove the reward.
-Eva