My son, was so mellow since babyhood, 1 years old, 2 years old, half of 3 years old, then BAM once he made 4 years old he was just like that.
It passes ya know.
Its another age phase.
Ya gotta enforce boundaries, rules, what is right and wrong and nice and mean etc. and explain to them, why.
Most of the time, my son just wants understanding. He will actually tell me when he is irked, frustrated, irritated, grumpy and why. He is articulate. I don't go against him... I will validate him THEN... segue him toward what I am trying to do with him. Then he is more palatable.
And then if he is unreasonable, I simply do not, give in.
The kid will turn into a Komodo Dragon, then, calm down. Then apologize.
The thing is, they KNOW they are being... icky.
By this age, they know.
But their emotions are still developing....
So you have to teach them how to communicate, still. And how to express things, in a palatable way.
Its okay to be grumpy or irritated for example... but teach them HOW to express that, in a more palatable way and express when they may want/may not want or need or not need.
I have also found, that WE parents really irk kids too.
Because we may not understand them or their cues.
Or they are over-tired or hungry or may need a nap.