Understanding how invasive plants may alter predator avoidance behaviors is important for granivorous rodents because their foraging can trigger ripple effects in trophic webs. Previous research has shown that European beach grass Ammophila arenaria, an invasive species in coastal California, affects the predation of other seeds by the rodents Microtus californicus, Peromyscus maniculatus, and Reithrodontomys megalotis. This may be due to lower perceived predation risk by rodents foraging in close proximity to the cover provided by Ammophila, but this mechanism has not yet been tested. We examined the perceived predation risk of rodents by measuring the ‘giving up density’ of food left behind in experimental patches of food in areas with and without abundant cover from Ammophila and under varying amount of moonlight. We found strong evidence that giving up density was lower in the thick uniform vegetation on Ammophila-dominated habitat than it was in the more sparsely and diversely vegetated restored habitat. There was also evidence that moonlight affected giving up density and that it mediated the effects of habitat, although with our design we were unable to distinguish the effects of lunar illumination and moon phase. Our findings illustrate that foraging rodents, well known to be risk-averse during moonlit nights, are also affected by the presence of an invasive plant. This result has implications for granivory and perhaps plant demography in invaded and restored coastal habitats. Future research in this system should work to unravel the complex trophic links formed by a non-native invasive plant (i.e., Ammophila) providing cover favored by native rodents, which likely forage on and potentially limit the recruitment of native and non-native plants, some of which have ecosystem consequences of their own.