Reason for muscle flexibility variance throughout the day

When I first wake up in the morning, if I try to touch my toes I can’t get anywhere close to them - I can barely get my fingers down past my knees.

But if I do the same stretch later on in the day/evening, I can touch them quite easily. Why is it so?