They eat only flying insects, which they catch in flight. Their diet is diverse, including dragonflies, damselflies, flies, midges, mayflies, stinkbugs, leafhoppers, Japanese beetles, June bugs, butterflies, moths, grasshoppers, cicadas, bees, wasps, mosquitoes, flying ants, and ballooning spiders. Martins are daytime feeders, and feed high in the sky. They can be fed mealworms and crumbled hard-boiled eggs on a platform 5 to 6 feet off the ground during these extreme periods of bad weather. The major reason people fail to attract martins is that they place their martin housing incorrectly.
Martins have very specific aerial space requirements.
Housing should be placed in the center of the most open spot available, about 30-120 feet from human housing. There should be no trees taller than the martin housing within 50 feet. Generally, the farther the housing is placed from trees, the better. In the southern half of their breeding range, martins are less particular about house placement. Southern landlords can sometimes place housing within 15-20 feet of trees and still attract martins.