There is a growing awareness that pregnancy can set the foundations for an array of diverse medical conditions in the offspring, including obesity. A wide assortment of factors, including genetic, epigenetic, lifestyle, and diet can influence foetal outcomes. This article reviews the role of melatonin in the prenatal modulation of offspring obesity. A growing number of studies show that many prenatal risk factors for poor foetal metabolic outcomes, including gestational diabetes and night-shift work, are associated with a decrease in pineal gland-derived melatonin and associated alterations in the circadian rhythm. An important aspect of circadian melatonin’s effects is mediated via the circadian gene, BMAL1, including in the regulation of mitochondrial metabolism and the mitochondrial melatoninergic pathway. Alterations in the regulation of mitochondrial metabolic shifts between glycolysis and oxidative phosphorylation in immune and glia cells seem crucial to a host of human medical conditions, including in the development of obesity and the association of obesity with the risk of other medical conditions. The gut microbiome is another important hub in the pathoetiology and pathophysiology of many medical conditions, with negative consequences mediated by a decrease in the short-chain fatty acid, butyrate. The effects of butyrate are partly mediated via an increase in the melatoninergic pathway, indicating interactions of the gut microbiome with melatonin. Some of the effects of melatonin seem mediated via the alpha 7 nicotinic receptor, whilst both melatonin and butyrate may regulate obesity through the opioidergic system. Oxytocin, a recently recognized inhibitor of obesity, may also be acting via the opioidergic system. The early developmental regulation of these processes and factors by melatonin are crucial to the development of obesity and many diverse comorbidities.