Will of Magic cameo! (clap clap clap)
I basically like two separate approaches to magic rules.
One is the mysterious nature of the universe. In that case, it might be a bit weird for something to arbitrarily end at "midnight". What does nature care of what we call midnight? Perhaps magic is affected by the position of the moon, or the dawn of the sun, but it shouldn't care where we set our clocks.
Second is there are one or more intelligences behind all the mechanics, in which case midnight could be significant for no other reason than humans place significance on it, and higher powers care about that sort of thing. Things being a result of higher powers wanting to be entertained honestly makes more sense to me than many other explanations when it comes to quirky restrictions on magic.
In canon EGS, there is effectively an intelligence behind the mechanics of magic, though its true nature is meant to be incomprehensible. For all we know, however, once all those layers of incomprehensibility are set out of the way, what's underneath could well be a desire to be entertained.
That, or EVEN MORE incomprehensible-to-humanity nonsense. The day I remove all doubt about how the Will of Magic canonically works is the day I'll have made a terrible mistake.