A dog will do whatever he can to get what he wants. If you have EVER got up when he starts with this behaviour, even to yell at him, he has succeded. If you have ignored him for a while and then got up out of sheer frustration, you have taught him to try HARDER and LONGER.
I teach dog training and none of my students are allowed to let their dog bark or whine in class or the parking lot. If they do, they must correct the dog with a 1 second POP upwards on the leash. No longer than ONE SECOND or you are "yanking", which is abuse. It has to be almost like the motion of a whip crack (POP - immediate release). It has to be firm enough to startle the dog in the midst of his misbehaviour so he can connect the pop with the crime. You would say "QUIET" in a loud firm calm voice (no emotion) and if the dog does not stop, pop him up again harder the next time he barks. Make sure the collar is up high behind the ears where he can feel it - too low and you're on the muscular part where they can't feel anything. Make sure the collar is snug enough too - it should fit like a watchband - snug but not tight.
If he sleeps in your bedroom, the minute he starts to whine, attach the collar & leash and wait calmly for him to misbehave. Don't touch him, talk or look at him - be an unemotional rock. When he starts to bark, use the technique described. He may yelp the first time - that's OK - you surprised him which is the whole point. If he continues to bark, say nothing, pop harder. He WILL get the point as long as you are FAST, FIRM and ON-TIME with your corrections.
I know everyone has different methods of teaching and I respect that. This is a method that will ALWAYS work if you do it correctly and consistently. Keep emotion out of the mix even though you feel frustrated - frustration may make you inadvertently pop harder. Your dog will quickly learn to be quiet when you command.