Many migratory water birds are known to feed both during day and night outside the breeding season, but the underlying factors and mechanisms determining this foraging pattern are poorly understood. We addressed this topic by comparing both diurnal and nocturnal foraging activity (FA) and metabolizable energy intake rate (MEIR) in migrating black‐tailed godwits Limosa limosa staging in two different habitats, rice fields and coastal salt pans. Black‐tailed godwits staging in rice fields during pre‐breeding migration fed on rice seeds, and only foraged during the daylight period (FA: 81.89 ± 3.03%; MEIR: 1.15 ± 0.03 kJ · min−1). Daily energy consumption (DEC) of godwits relying on seeds was enough to meet the theoretical daily energy expenditure (DEE). In contrast, black‐tailed godwits staging in salt pans during post‐breeding migration fed on chironomid larvae, and they foraged during both daylight (FA: 67.36 ± 4.30%; MEIR: 0.27 ± 0.01 kJ · min−1) and darkness (FA: 69.89 ± 6.89%; MEIR: 0.26 ± 0.00 kJ · min−1). Nocturnal energy intake contributed 31.7% to DEC, the latter being insufficient to fully meet DEE. Our findings give empirical support to the view that diurnal foraging is the norm in many migratory water birds outside the breeding season, and nocturnal foraging occurs when the daily energy requirements are not met during the daylight period, supporting the supplementary food hypothesis.