Ever notice how, if you get a mosquito in your bedroom, it will sometimes buzz right by your ear? I suspect this is an evolved survival mechanism to check if you are asleep. If you're awake and they start sucking your blood, you'll probably notice and squish them. If you're not asleep it's almost impossible to avoid reacting when they buzz past your ear. So, as you're trying to fall asleep they will buzz past your ear every once in a while and only start to go for your ankles if you don't react.
Trouble is, some people (like me) are light sleepers and get woken up by these fly-pasts. This causes a loop as I start to drift off to sleep, get buzzed awake, swat the mosquito away and repeat. No meal for the mosquito, but no sleep for me either. Last time I got a mosquito in the bedroom I went through a few cycles of this and then tried to find it for a while and but eventually gave up and had to go to sleep in another room. The next day I found it on a wall and squished it.