Adult gnats usually lay eggs in organic material, depending on the species. For instance, while fungus gnats typically nest in decomposing matter in potted soil, fruit flies look for ripe or decaying fruits sitting out in open air to lay their eggs.