I want you to read this and let it sink in: Your sleep is more important than your pet's temporary comfort. Did you get that? If allowing your cat or dog to sleep on your bed at night is affecting your sleep negatively, it's time to re-evaluate your sleeping situation.
I know, your pet is a family member. An adorable cuddly member of your household whose safety and health and comfort is your responsibility. I get it. I have loved ALL of my pets - past and present - more than I have loved most of my past boyfriends, but there is a limit to what we should be sacrificing for them. If you are struggling to get the sleep your body and brain need to function the next day, let me remind you of this fact:
Your pet will sleep the entire next day while you are fighting to keep your eyes open at work, and while you perform important daily tasks like driving a car and taking care of other humans, including yourself.
Our pets have NO responsibilities that require them to be alert tomorrow besides being adorable and chasing squeak toys. I also want to remind you that dogs and cats often choose to sleep on hardwood and ceramic tile floors, so it is not cruel to keep your pet off your bed at night in order for you to get a good night's sleep. That's what dog beds and cat beds are for. Some of them are even cozier than human beds. I know, I've tried them.
I am giving you permission to put a dog bed on the floor, sit your dog down on it, then leave him there and go to your own bed. (I suggest avoiding eye contact while you do this as to not get sucked-in by his sad puppy-dog eyes.)
I am giving you permission to close the basement door while your cat sleeps contently on a couch beside her food and water dish, with her litter box close by. She may not be happy with you in the moment, but she'll forgive you when the morning brings a freshly-opened can of cat food. You are not a horrible pet owner by valuing your own sleep more than your dog or cat's temporary desire to cuddle. They will be fine waiting until morning to see you again, and I promise they will forgive you. They might even prefer this new well-slept non-grumpy version of their beloved owner. So repeat this to yourself when the guilt starts to set in: My sleep is important, and they will get over it.
And then believe it.