Adult mayflies don't eat. Their lifespans range from a few hours to two days, and their only purpose is to reproduce. After this, they die.
However, mayfly nymphs, which are aquatic, eat whatever they can. They even scrape algae and other detritus found on rocks and weeds for food. Other larger mayfly nymphs are predators and catch smaller insects and larvae that live in the water.
After some months, mayfly nymphs leave the water and change into subimagos, which have wings but are not quite adults. The subimagos then fly to a sheltered area and molt into full, reproductive adults (imagos). Neither subimagos nor adults eat.