Hormones play a fundamental role in homeostasis. We develop a state-space model relating the body's internal energy to cortisol hormone secretions. Cortisol is secreted in pulses and follows a 24 h circadian rhythm. Secretory event timings carry important information regarding internal feedback signaling taking place, as do the upper and lower serum cortisol levels. We relate an internal energy state variable to cortisol pulse timings and to the upper and lower serum cortisol envelopes. We derive Bayesian filter equations for state estimation and use the Expectation-Maximization algorithm for model parameter recovery. Results on multi-day simulated data show circadian energy variations in healthy subjects and non-circadian fluctuations throughout 24 h periods in patient models suffering from hypercortisolism. The results shed new light on why patients diagnosed with excess cortisol disorders frequently experience symptoms of daytime fatigue and sleep disturbances at night. The state-space model is also an important first step towards the design of closed-loop controllers for treating hormone-related disorders in a manner that closely emulates the body's own pulsatile feedback mechanisms.