As soon as I get to the stage that I am questioning my ability to work the next day, I let parents know.
If that's before pick up time on the prior day, I'd mention that I wasn't feeling well, planned an early night to see if that helped but be prepared with back up care in case I feel worse. If it's the middle of the night, then I would e-mail all client plus post in my FB group for current parents. I tend to request that they respond to the e-mail or FB post so I know they have seen it, and that for anyone who hasn't responded, I'd set my alarm for 6am and call them. My earliest arrival is 7am.