Cats are not known to be cooperative. Sometimes they sleep on your bed, often in positions where you’ll be most uncomfortable, and sometimes they sleep away from you, usually so they can make a racket later that night when you’re just about to fall asleep.
To help make night time easier for you, you may want to train your cat to sleep, or at least let you sleep at night. One suggestion is to hide quiet toys around the house for the cat to discover at night. Another trick is to play with the cat late at night to wear it out. Still another trick is to avoid getting a cat altogether.