This article may be used for research, teaching and private study purposes. Any substantial or systematic reproduction, redistribution , reselling , loan or sub-licensing, systematic supply or distribution in any form to anyone is expressly forbidden. The publisher does not give any warranty express or implied or make any representation that the contents will be complete or accurate or up to date. The accuracy of any instructions, formulae and drug doses should be independently verified with primary sources. The publisher shall not be liable for any loss, actions, claims, proceedings, demand or costs or damages whatsoever or howsoever caused arising directly or indirectly in connection with or arising out of the use of this material. Conserving habitat for migratory birds presents a unique set of challenges, because multiple reserves distributed across space are required for complete protection of single species. We developed the Flight Leg Allocation Problem (FLAP), a distance-constrained shortest path problem, to identify optimal configurations of stopover habitats for migratory bird conservation. FLAP is based on a relational network topology model, where stopovers are represented as nodes and potential pathways by links. FLAP finds the optimal migratory pathway that consists of the fewest number of stops in the shortest distance, given that flocks of birds are limited by maximum daily flight capabilities and constrained by carrying capacities of individual habitats. We first present the FLAP model formulation and describe results of an empirical test for a large wetland dataset under different climatic conditions. Our results illustrate how migratory birds might respond to changes in both the temporal and spatial distribution of available stopovers. We also discuss conservation implications for using FLAP to identify priority sites for migratory birds in nature reserve networks. Additionally, the methods presented in this paper may be useful for modelling other types of spatially and temporally dynamic networks.