I personally never drink coffee when I'm really tired. because it just makes me jittery.
I like to wake myself up a bit first with a bit of movement and stretching, that it puts me in a better mood and helps with energy.
As a rule, when you are tired your body is telling you to sleep so don't take stimulants.