They are afraid
People who fear sleeping in dark rooms or fear sleeping alone might cover their faces to feel more comfortable. By doing so, a person can feel safe and protected and can sleep. (See What are the body language signs of fear?)
They believe in ghosts
If a child believes in ghosts, they might develop the habit of covering their face when they sleep so that the ghosts or monsters don’t see them. This belief usually persists as a person grows up, and so the person ends up covering their face even as an adult. (See Are Ghosts Real?)
They hate to lose control
People who hate to lose control have a hard time keeping their eyes closed, as they can’t control their environment anymore. Those people might cover their faces to experience an additional amount of control in the new environment they created under the blanket.
To block light
People who sleep in rooms that are not that dark and the ones who fear sleeping in dark rooms might cover their faces to block the light to sleep well.
To keep their heads warm
People who only cover their heads in winter or cold days might just be doing it to keep their heads warm.
To reduce noise
People who cover their heads with blankets in noisy areas might only get rid of the noise. If this sleeping position becomes a habit, then a person will only feel comfortable sleeping that way even if there is no noise.
They feel insecure
Fear of the unknown, fear of the future and general feelings of insecurity can cause such a habit. A person who hides their face might unconsciously believe that they are escaping from their fears.
Lack of courage
A person who covers their head with a blanket might be too afraid to face their life problems, and they might believe that by covering their face, they would be escaping from them.
They got used to it
Some people who used to have certain fears and managed to get over them might still keep the habit of sleeping that way because it makes them feel more comfortable.