An idiom meaning a person can't keep going, usually due to being too tired. Usually used to say one can't keep going after midnight.
It's too late for me, I turn into a pumpkin at midnight.