A fly is attracted by the smell of a human body, which is why a fly crawls over it, and a calm state of a person creates an attractive safety factor for it.
She, like a mosquito, flies on heat radiation, mouth, axillary and foot stink. The smell of decomposition is sweet and pleasant to her, because the foul-smelling substrate can contain decomposed proteins, that is, what she needs, what she can suck through her proboscis.
Some people suffer from diabetes, they have sweat sweetish, suitable for a fly.
As already mentioned here, a fly also lays eggs on corpses. Dig up the coffin and you will see a lot of worms. And where did they come from, because the coffin has not rotted yet? And from the soil they could not vzyatstsa? But these are maggots, the fly has laid testicles on the nostrils, mouth and ears.
Even a fresh corpse begins to decompose after a few hours. The finest trickles of the stench, which is completely imperceptible to humans, are very well heard for the fly. She flies on the stench and lays her testicles)))
So a fly loves to crawl over an unsleeping person too ... but not the sleeper chases her away.
Yes, the sleeper also feels the fly, twitches and chases it away. Sometimes he wakes up.
In addition, usually people sleep in the dark, and flies do not fly in the dark, they need to see where to fly.
If you turn off the light, the fly flies in the dark for a while and sits down the very first obstacle it hits.
So flies don't crawl over sleeping people either ... at least at night.
Not just because of sweat. The fly needs to find a warm, humid, dark place to lay its eggs. To keep the future larvae warm, damp and around there was a lot of food. A good place to do this is in the mouth and nose. That is why when a person dies, flies first lay their eggs in the nose and mouth. One of the traditional methods of determining the prescription of death in forensic medicine is based on this. When a body is found (meaning the warm season), the age of the fly larvae removed from the nose is estimated. Therefore, flies so annoyingly climb over the body (especially on the face) when a person is sleeping. But the breath of a living person does not allow them to do their job.
Because a person, relatively speaking, smells good for a fly. For you, he may not smell at all, but for her there is a whole spectrum of sensations arising from chemical compounds secreted by a person. And when a person sleeps, firstly, he does not move, so it is convenient to climb on it, and secondly, during sleep, a fairly large amount of sweat is released (I read somewhere that up to 200 ml., But something is too much I think), attracting a fly.