If you end up with a snake on your chest while sleeping, you can rest assured that the snake is not in an aggressive mood. It's on top of you because it thinks you're cozy and warm, if it's cozy then it's going to be pretty mild tempered. I imagine you could easily grab it behind the head and take it out of your tent. If you don't want to touch it, just flip the top of your sleeping bag over it, get out of your bag, gather it up, then go shake your bag out away from your tent. Snakes only strike when they feel threatened, if a snake is getting snuggly with you, then it obviously doesn't feel threatened. The most important thing to do would be to remain calm and don't make any sudden movements that might startle the snake, chances are good that it could be asleep, the next most important thing to determine is what kind of snake is it? You only need to worry about it if it's poisonous.
One way to prevent snakes from slithering up to you is to clear away everything on the ground around where you're sleeping. Snakes don't typically like to slither out into exposed areas, so if you clear away all the leaves, sticks and grass then the snakes may just stick to the shrubs and go around you. Sleeping in a hammock or off the ground some other way is also advantageous in preventing this kind of critter encounter.
Your situation could be worse. My aunt was camping alone one time and a big black bear found her and snuggled up to her in the middle of the night, it laid down right on the zipper of her sleeping bag, trapping her there. She had no choice but to wait it out. After a long night of loud bear-snores the bear eventually woke up and just wandered off. My experience with snakes is that they typically want to get away from you, if I had a snake on me I'd probably just bat it off and away from under the bag and roll away from it, chances are good it'll be like, "Holy crap that was a living thing I was on!" and just slither away back into the bushes.