Once in a while I feel grumpy. No special reasons. I just don't feel happy, or I don't want to feel happy. There are things that worry so I am not happy. I am sure I am entitled to not be happy or feel happy. The same can be said with humans.
When I'm in one of these moods, Mr. B. would try to console me by saying "Cheer up!" or "It will be alright!" or "It could be worse!". I am sure you have said the same thing to someone in more than one occasion. I think that is wrong.
Firstly, when you tell someone who is not feeling happy to "cheer up", you are basically negating and invalidating what that person is feeling. You are implying that whatever is making that person unhappy is not important so he should not feel that way about it. Secondly, most likely the reason why you are telling that person to cheer up is because you are not comfortable seeing him grumpy. In that sense, you are selfish and not sympathizing with the unhappy person. That is not good either.
The worst thing to say to an unhappy person is "I know how you feel." because most likely, you don't and you can't know how the other person feels.
So what to say to a grumpy person? Nothing. Just acknowledge the fact that he or she is not feeling cheerful and these things do happen. And it will pass. In his or her own time.
Don't try to cheer him up.