Earwigs are nocturnal insects; they are active at night. They feed on plants, insects, and fungus. They usually do as much good in the garden as harm.
Earwigs can be a nuisance if they enter your home. A few cultural practices can help prevent this problem.
1) rake mulch, especially organic mulch, away from the house foundation about 2 feet
2) keep the soil near the house foundation dry most of the time
3) seal cracks and gaps in foundations and basement windows.
Butterfly bush is one of earwigs' favorite foods.
Earwigs like moist habitats, so mulch is very attractive. Usually, some earwig damage is tolerable for most plants. If damage is too severe, remove mulch from the base of the plants to eliminate earwig habitat.