Methods for getting rid of mayflies range from changing out light bulbs to using a bug fogger. Mayflies have a short lifespan, only 36 to 72 hours, so waiting them out is also an option.
Mayflies are attracted to light at night, especially white lights. Therefore, the simplest method for eliminating mayfly swarms is to exchange white bulbs for yellow on outdoor lights. Drawing the shades at night will limit the amount of mayflies that are attracted to interior lighting.
Mayflies live and breed near water, especially lakes. In fact, they are often used as an indication of clear water in water studies since they need pollution-free water in which to lay their eggs. Therefore, one step is to remove standing water near the house so that they are less attracted to the area. Mayflies also do not like the smell of garlic. So a homemade remedy to repel mayflies is to make a tea of crushed garlic and water (use plenty of garlic because a potent brew is more effective). Use a spray bottle to spray the garlic solution around the house. Alternatively, spread dry minced garlic around the perimeter.
If all else fails, use a bug fogger with an insecticide. This is efficient for large swarms of mayflies, especially for homes near lakes.