The amount of cerebral functions is particularly elevated. This intense activity requires a great expenditure of energy: the restoration of energy is the fundamental function of sleep whilst the slowdown in energy consumption may be considered the physiological effect of primary headaches. The continuous interaction of sleep and primary headaches is possible as they share many anatomical and functional cerebral systems. Areas covered: This review describes how sleep and headaches are reciprocally involved in preservation and restoration of brain energy. Data were obtained from the most relevant and recent works available in PubMed about this topic. Expert commentary: The energetic view of sleep, primary headaches and their relationship may have relevant clinical consequences: the investigation and the modification of the multiple aspects, primarily environmental, that may influence sleep and headache, become mandatory to facilitate the cerebral energy preservation by reducing its consumption and by ensuring its recovery.