Well, the whining could be seperation anxiety. Is the pup sleeping with you? In the bed? In a crate? Does he have to go potty? Most puppies do need to go potty atleast once through the night. Is he eating enough? If not, he could be hungry.
If you have a crate, put it in the bedroom with you. Give him a chew toy and stuffed animal to make it more comfortable. If you have a tshirt you wore, put it in the crate with him. Just the smell of you can be calming.
Until you figure out what he is whining about, it's hard to put a time frame on any behavior.
But remember, he's just a baby. Yes, babies whine and cry all the time. But it gets easier. I promise.