There are many methods, but I can speak in general about how I do things.
Set up a variable that represents the time of day. I usually decide 0=dawn, 1=morning, etc. I am rusty with Inform, but you might also be able to use a “value that varies” with named units but sometimes for code purposes it’s good to have it as an integer to check.
Then you’ll want to create a phrase with a routine that “ticks the clock” and can be set off wherever you need it - either manually with story progression, or by counting turns - however you want to do it.
Assuming your variable is called “phase”. (This is pseudocode which you will need to tweak - again, rusty!)
to tick the clock:
increase phase by 1;
if phase is greater than 4:
set phase to 0;
decrease energy by 15;
[other things that happen, mana regeneration, messages about sun rising or setting, whatever]
Then you can use that as a command:
Carry out going north in endless desert:
tick the clock.
After talking to the StoryTeller:
say "'I'm going to tell you a very long story,' says the StoryTeller. Once upon a time...'";
tick the clock;
say "'...and they all lived happily ever after!' finally concludes the StoryTeller, looking like he might need a smoke break."
Or
Every turn when the player is on comfy bed:
say "You snooze peacefully and are rejuvenated!";
tick the clock;
increase energy by 30.
And
Before entering the Useful Shoppe:
if phase is less than 1 or phase is greater than 3:
say "The Useful Shoppe is unfortunately closed right now, come back during business hours." instead.
Check taking heavy anvil:
if energy is less than 20:
say "You don't have the energy to pick up the anvil right now." instead;
Carry out taking heavy anvil:
decrease energy by 5:
say "Urrghphhh! Heavy! (Your energy decreases by 5...)"