Your cat sleeps on your head because it is warm!
Cats like to sleep where it is warm, and they also like to sleep with you. Cats will generally do no harm if they sleep on you. However, if your cat is sleeping on your head, you should ensure that you do not have cat allergies. You may be very uncomfortable if you are breathing in cat allergens all night, caused by your cat sleeping so closely to you.
You should keep your cat away from babies or small children so your cat does not attempt to lay on them.
Cats may also sleep on your head so they are easily awakened when you wake up. Cats sleep for about 16 hours/day but they are usually awakened quite easily. Cats generally wake up when their owners wake up. Perhaps they simply want their breakfast.