During winter flies will hibernate, sometimes in large groups, in any available dry and warm space such as an attic.
The reason there are so few houseflies in winter is that their eggs will hatch only at temperatures between 24º Centigrade and 35º Centigrade (75º Fahrenheit and 95º Fahrenheit). Meanwhile their numbers steadily diminish owing to insecticides and natural causes. This is a good thing since flies often carry diseases