Meaning: to be in a state of irritation where you do not care about others feelings and start complaining about everything. You are not under your own control. When someone expresses their feelings using this phrase, it signifies that they are also very unhappy about such behavior by you.
It cannot be " Hey! I liked you being a bear with sore head last morning".
The phrase is used only in negative sense.
1) I am sorry, I was like a bear with a sore head last morning.
2) Why are you always like a bear with sore head?