||Throughout the oceans, small fish and other micronekton migrate between daytimedepths of several hundred meters and near-surface waters at night. These diel vertical migrationsof mesopelagic organisms structure pelagic ecosystems through trophic interactions, and are akey element in the biological carbon pump. However, depth distributions and migration ampli-tude vary greatly. Suggested proximate causes of the migration such as oxygen, temperature, andlight often correlate and therefore the causal underpinnings have remained unclear. Using meso-pelagic fishes and the Norwegian Sea as a study system, we developed a dynamic state variablemodel that finds optimal migration patterns that we validate with acoustic observations along alatitudinal gradient. The model describes predation risk and bioenergetics, and maximizes ex -pected energy surplus, a proxy for Darwinian fitness. The model allows us to disentangle the driv-ers of migration and make predictions about depth distribution and related fitness consequencesalong a latitudinal trajectory with strong gradients in environmental drivers and vertical distribu-tion of scattering layers. We show that the model-predicted vertical migration of mesopelagicfishes matches that observed along this transect. For most situations, modelled mesopelagic fishbehaviour can be well described by a light comfort zone near identical to that derived from obser-vations. By selectively keeping light or temperature constant, the model reveals that temperature,in comparison with light, has little effect on depth distribution. We find that water clarity, whichlimits how deeply light can penetrate into the ocean, structures daytime depths, while surfacelight at night controlled the depth of nocturnal ascents.