As with any dog habit, things will be easier if you allow your Yorkie to slowly get used to the idea of a change, as opposed to suddenly trying to enforce new rules. Here is what you can do, to train your Yorkie to stop sleeping on your bed and actually enjoy snoozing in his or her own area:
1) It is suggested to obtain a high quality dog bed. Since your Yorkie is used to your bed, choose a semi-nestling bed or one with deep walls to mimic the safety and security of your own bed. You may also want to go up a size, opting for a small breed size as opposed to a toy sized one. This way you can have room to layer in some baby blankets.
2) Place that on top of your own bed. Please be sure to have it in an area in which it cannot fall onto the floor as your dog could be quite injured. If your bed rests against a wall, you will want to place it in the corner, against the wall and the headboard.
3) When it is time for your Yorkie to sleep, encourage him to rest his own mattress, it can help to place a new interesting toy on it.
4) Lay close and give some gentle pats, while you each lie in your own bed.
5) For each 10 minutes that your Yorkie stays in his or her own place, give rewards of praise and happy words.
6) If your Yorkie crawls out and tries to slowly creep onto your pillow, gently place him back.
7) After a week or so, place the dog bed on the floor, very close to you. Again, put a new and interesting toy into the doggie bed, this will keep your Yorkie focused on the toy and not on his location.
8) Your Yorkie may show resistance. He may beg or whine. Ignore this
behavior
as much as you can. After a while, he will become tired and just give up. This may be a "game" of who can last the longest...Do try to have it be you...If not, this could take much longer to do. Once you are the one to win out, it is at that point that your Yorkie will retreat to his sleeping area. When your dog is lying quietly, do not speak excitedly or loudly, as he or she may mistake this for you trying to get his attention and come to join you.
Remember to always praise good behavior and to ignore negative behavior. That is the key. Your Yorkshire Terrier will soon learn that sleeping in their own area = praise, treats & toys and that trying to get back into your bed = being ignored, having no treats and not receiving praise.