Abstract All animal behaviour must ultimately be governed by physical laws. As a basis for understanding the physics of behaviour in a simple system, we here develop an effective theory for the motion of the larval form of the fruitfly Drosophila melanogaster, and compare it against a quantitative analysis of the real animal’s behaviour. We first define a set of fields which quantify stretching, bending, and twisting along the larva’s antero- posterior axis, and then perform a search in the space of possible theories that could govern the long-wavelength physics of these fields, using a simplified approach inspired by the renormalisation group. Guided by symmetry considerations and stability requirements, we arrive at a unique, analytically tractable free-field theory with a minimum of free parameters. Unexpectedly, we are able to explain a wide-spectrum of features of Drosophila larval behaviour by applying equilibrium statistical mechanics: our theory closely predicts the animals’ postural modes (eigenmaggots), as well as distributions and trajectories in the postural mode space across several behaviours, including peristaltic crawling, rolling, self-righting and unbiased substrate exploration. We explain the low-dimensionality of postural dynamics via Boltzmann suppression of high frequency modes, and also propose and experimentally test, novel predictions on the relationships between different forms of body deformation and animal behaviour. We show that crawling and rolling are dominated by similar symmetry properties, leading to identical dynamics/statistics in mode space, while rolling and unbiased exploration have a common dominant timescale. Furthermore, we are able to demonstrate that self-righting behaviour occurs continuously throughout substrate exploration, owing to the decoupling of stretching, bending, and twisting at low energies. Together, our results demonstrate that relatively simple effective physics can be used to explain and predict a wide range of animal behaviours.