When babies get too tired they can kick and be fussy. Mostly they don't have any other way of expressing themselves when they are very young.
I've seen a premature baby kick and fuss when she was too cold. The cure was to pick her up and let body heat warm her by holding her close. She kicked as a way to raise her body temperature by muscle action, an unconscious response.