The Eurasian woodcock prefers habitats where its main prey, earthworms, can be found in higher densities. Although they are forest‐dwelling birds, they regularly visit pastures and natural grasslands at night, where earthworm abundance is generally higher. However, there is little information on fine‐scale habitat use in relation to variation in habitat characteristics and prey availability, particularly beyond the breeding season. In our study, we investigated if the nocturnal occurrence of woodcocks during migratory stopover periods differed between two neighbouring fields, or management units, with similar vegetation structure, and if within‐field variation in the spatial patterns of woodcock sightings were associated with fine‐scale earthworm densities and soil parameters. Specifically, we used GPS tracking data of two tagged woodcocks and direct observation data to study patterns of occurrence of birds in a mixed forest‐pasture landscape in Hungary during pre‐ and post‐breeding periods. We compared these patterns with fine‐scale soil characteristics and earthworm abundance, acquired by field sampling. We found that the field with higher earthworm abundance was visited by woodcocks more frequently, and this correlation was similarly observed at the intra‐field level. Our results demonstrate that woodcocks select foraging sites with higher earthworm densities at multiple spatial scales, both between fields (coarse scale), and within fields (fine‐scale). Considering that woodcocks tended to return to the same field to forage at night, the strong associations between occupancy and resources provide a basis for developing habitat management strategies at the field level for conservation. As earthworm densities and soil parameters are good indicators of woodcock foraging habitat, measuring those variables, at least at a coarse scale, could aid in predicting important habitats for the species across the landscape.