Writing from a household with a fly problem in summer, I have performed some small analysis on this very subject.
They roost on the ceiling and oak beams downstairs. Armed with my trusty vacuum cleaner (fitted with the supplied extension) I have, on occasion, removed up to 20 or 30 flies from this area per evening. Unfortunately the corpses are replaced by live relatives the next day so I ceased operations when it quickly became an exercise in futility.
I’m not oblivious to the probability that, if I can target and obliterate 30 flies, there must be other roosting locations of which I am unaware. I suggest, with no cite, that flies also occupy Dark Corners unidentifiable by me and my vacuum cleaner.
Flies are far more sluggish in the evenings and at night because they require some heat to operate successfully. In my case it’s noticeable that during a sunny day these insects come into the house in much greater numbers than on a dull and overcast day. This torpidity renders them much easier to vacuum (or to swat if you prefer) in the evenings than during a hot day.
This perhaps begs the question as to where flies go at night outside the house. I would say, again without a cite, that they roost in vegetation, on the walls of buildings or anywhere they can remain unobtrusive and unnoticed by predators.
And vacuum cleaners.