Oh my goodness, he is SO adorable!!! 💘
It could be a combo of: he isn't tired out and he wants to be touching you. There is a quote "A tired puppy is a happy puppy" (or rather... a tired puppy is a quiet puppy

).
My 5 month old puppy sleeps in her crate right beside my bed (I have hardwood floor, no carpet, and my bed is really high off the ground, asking for disaster if she sleeps with me, and she isn't thoroughly potty and house trained to NOT crate her in). There were a few times where she would scratch at her crate wanting out during her bed time (10pm), and it was because:
- in the beginning of crate training when she wasn't used to it (i just ignore it and soothe her by laying next to her crate with my fingers poking through)
- She wasn't tired out enough (I was too busy to adequately tire her out)
- I let her nap too close to bed time (again b/c I was too busy to notice she was snoozing too close to bed time)
At around 7 or 8PM I make it my mission (motivated by the freedom from her at 10pm) to tire her out: walking, play chase, nose work, or just keep her awake). Then comes 9pm and it's time to wash her face, my face, and get ready for bed so it's quiet time. Then into her crate she goes at around 10pm and I'M FREE!
I don't know if crate training is right for you, the downfall of crate training is that you have to let them out to pee during the night, or if they can hold in their pee overnight, you'd have to wake up pretty early to ensure they aren't exploding by morning (which for me is 5am or 6am depending on when she peed last). I'm not sure if this is what you do already. I had to wake up once in middle of night for a few weeks to let her pee until i realized... my girl can hold in her pee over night (small pups mature faster??)
If you don't like crate training and prefer play pen with potty station, then I'd recommend what others have recommended (
iris pen, i have three SETS of these, i love these so much). And if he is a climber, I also got this:
iris playpen top cover mesh (it will also make it easier to drape a cover over it). And because of your carpet, buy like a
plastic tarp to lay on the ground. And then buy like a flat bed sheet to cover the play pen to create a more "den like" experience. Don't cover the front panel though, need air circulation.
I would put this setup next to your bed, and for the first few days if you can: sleep on the ground right next to it so he can see you (I practically planted my face right next to the opening of crate), and poke your fingers in through the bars so he can sniff and cuddle next to it if he wants to. Then move to your bed, and poke your fingers in for a few days or a week depending on how much he whines. And then eventually you can remove your fingers once he settles in. Then after a few weeks, you can just have him enter his "den" at bed time, and leave him to sleep. I never "place" her in her crate, I lure her in with a treat so she goes in willingly. I am hoping that eventually she'll just go in when I say "go to bed", but at the moment I still have to lure her in. This is the method (not exact) I used to train my pup to sleep in her crate when I first got her (this play pen creation, is just a BIGGER crate). Keep in mind that lights have to be out or dimmed to help them sleep.
I also had this in her crate as well:
snuggle puppy. I don't really know if the heart beat works, i never tried it. I also used the heat pad for a few days but stopped using (b/c it was too warm anyways). I might use it in coming winter though. I thoroughly saturated this snuggle puppy with my scent by sleeping with it for a few weeks before she came to me. I think rubbing it on your not too fresh out of shower skin or few days old clothes will work too
Not sure if this method will work for you, but good luck!