When Charlie got super hyper in bed was when my bf was over and laying in bed too. It was too exciting for him and he would fly all over and also bite. He neve did this to me alone. Him being this hyper was unsafe though as he could had easily fell off the bed so when he got crazy he went into the crate beside my bed and we ignored him. Same when he bit and wouldn't stop when told no. He quickly grew out of the biting stage. It literally only lasted a mnth or so if that. On one or two occassions I shook a can of coins and said no bite. It scared him and he stopped.
The same w/ his barking. He was barking at others seeking attention and wanting them to play. It took one or two times of them shaking the can hard and saying no bark and he has stopped that behavior. Again, he does not bark at me so it wasn't something I could break him of just sitting at home alone.
Is your pup potty trained? I would only allow Charlie on my bed while I watched TV at night after I knew he just went potty. Then when I slept he went in his crate. In the morning after he went potty I allowing him in bed w/ me but he had to stay right beside my stomach. He would try to crawl up to my pillow and I would grab him and put him back next to my stomach. Gradually I let him go up on my pillow.
He peed on my bed 3 times. Once as a little puppy when we were just playing. Once just right in front of me for no reason. The third time at the end of the bed at night. These were spread out. After that third time I said sorry back to the crate you go until I get puppy steps so you can get down and potty on your own. I immediately ordered steps and he hasn't had any issues since. He never is in his crate at night. He gets off the bed and goes to the other room where his pad is, pottys, and comes back to bed. I remember reading about other yorkies that did this when I first got Charlie and wondered how on Earth I could teach him that. He naturally did it because he knows where his designated potty area is. The good thing is if I want to sleep in I can. He doesn't bug me. I've even heard him get down in the middle of the night to potty and come back to bed. Just some ideas on his progression for you. He is 6 mnths old.
A funny this is remember how I said I forced him to sleep only by my stomach then allowed him on my pillow when he was small in the mornings? Now guess where he sleeps in the am. At night he might sleep behind me etc but in the morning he is beside my head on my pillow or makes me open the blankets so he can snuggle next to my stomach/chest.