Insects in dreams can reflect the feeling that something is irritating or bugging us.
They may also indicate our feelings of insignificance and powerlessness and it will depend on the particular insect in the dream as to the interpretation.
Thus, a wasp might indicate danger, whereas a beetle could mean either dirt or protection. Fleas are an irritation; there may be people or situations in our lives that are causing us difficulty, or that we feel are being parasites, and we need to go through a process of decontamination in order to be free. Flies are always associated with something nasty, which does not allow for the fact that they also devour rotten material, and thus are cleansing.
So to dream of flies is to be aware that we have certain negative aspects of our lives that need dealing with.
To dream of a swarm of flies indicates the deliberate intention of a large group of individuals. Where one insect may appear to be moving aimlessly, large numbers do not. Often we can only succeed in changing matters by group behaviour.
As with most insects, the mantis often represents something devious within our lives.