Maybe he or she is testing their breath for freshness. I have no idea my dog does the same thing too. I will hear him snort inside the shoe. He seems to only do it in my husbands shoe.
Sometimes he even falls asleep with his face in a shoe. That seems to happen when it is cold. So I assume he doesn’t like breathing cold air and this may be a way to warm up the air a little.
I sleep under the blankets when the air is to cool and I have the sniffles. Maybe they do the same when they have a cold.
Or it is as @wildpotato suggests.