Gnats are nocturnal and sleep during the day. During this time they will rest in shaded areas like plant leaves or around drains. They will also sleep in cool areas such as damp basements and bathrooms or in the corner of a room. Gnats will not eat, but they are attracted to sweet and fruity scents as well as body heat.
If gnats are seen flying around the house, they can be confused with fruit flies and drain flies (also called phorid flies). They may also be referred to as “gnats”. Gnats have different life cycles than mosquitoes and go through four stages: egg, larva, pupa, and adult. The life cycle is accelerated by warm temperatures. Gnats will lay their eggs in rotting food, manure and other organic materials, then mature into the pupal stage. When the gnat emerges as an adult, it will be attracted to sweet and fruity scents, and will fly close to people and other animals.
Taking out the trash at night and keeping a garbage can with a tight lid will help to deter gnats. Gnats will also be drawn to rotting food, so keeping your kitchen counters clean and storing fruits in the refrigerator is important.
Overwatering plants can also attract gnats, as will letting soil dry out between waterings. Keep in mind that fungus gnats feed on roots and can stunt plant growth, particularly seedlings, cuttings and young transplants. To avoid a bad infestation, it is best to water your plants only when needed and to place any ripening produce in the refrigerator to prevent the spread of these pests.