The interaction between hormonal circadian rhythms and feeding behaviour is not well understood. This study aimed to deepen our understanding of mechanisms underlying circadian feeding behaviour in animals, using pigs, Sus scrofa, as a case study. Pigs show an alternans feeding pattern, that is, a small peak of feed intake at the beginning of the day and a larger peak at the end of the day. We simulated the feeding behaviour of pigs over a 24 h period. The simulation model contained mechanisms that regulate feeding behaviour of animals, including: processing of feed in the gastrointestinal tract, fluctuation in energy balance, circadian rhythms of melatonin and cortisol and motivational decision-making. From the interactions between these various processes, feeding patterns (e.g. feed intake, meal frequency, feeding rate) emerge. These feeding patterns, as well as patterns for the underlying mechanisms (e.g. energy expenditure), fitted empirical data well, indicating that our model contains relevant mechanisms. The circadian rhythms of cortisol and melatonin explained the alternans pattern of feeding in pigs. Additionally, the timing and amplitude of cortisol peaks affected the diurnal and nocturnal peaks in feed intake. Furthermore, our results suggest that circadian rhythms of other hormones, such as leptin and ghrelin, are less important in circadian regulation of feeding behaviour than previously thought. These results are relevant to animal species with a metabolic and endocrine system similar to that of pigs, such as humans. Moreover, the modelling approach to understand feeding behaviour can be applied to other animal species.