Natural swimmers rely for their survival on sensors that gather information from the environment and guide their actions. The spatial organization of these sensors, such as the visual fish system and lateral line, suggests evolutionary selection, but their optimality remains an open question. Here, we identify sensor configurations that enable swimmers to maximize the information gathered from their surrounding flow field. We examine twodimensional, self-propelled and stationary swimmers that are exposed to disturbances generated by oscillating, rotating and D-shaped cylinders. We combine simulations of the Navier-Stokes equations with Bayesian experimental design to determine the optimal arrangements of shear and pressure sensors that best identify the locations of the disturbance-generating sources. We find a marked tendency for shear stress sensors to be located in the head and the tail of the swimmer, while they are absent from the midsection. In turn, we find a high density of pressure sensors in the head along with a uniform distribution along the entire body. The resulting optimal sensor arrangements resemble neuromast distributions observed in fish and provide evidence for optimality in sensor distribution for natural swimmers. † Email address for correspondence: petros@ethz.ch arXiv:1906.07585v1 [physics.flu-dyn]