I don't think there is ever a good enough excuse to be rude.
I don't think pain or exhaustion or hunger should pardon harsh words and impatient behavior. With very few exceptions, behavior is a choice. Circumstances, conditions, situations... those are often out of personal control. While circumstances cannot always be regulated, reactions can.
The way a person responds in light of trying conditions speak a lot for his or her character. I'm tired of hearing, "I'm in a lot of pain, okay?", "I'm just really hungry", and "I didn't sleep much last night" as excuses for impolite behavior.
The phrase I detest the most is "Don't take it so personally" as if my hurt feelings are a result of being weak.
So this is my charge: Stop passing the blame for your ill-mannered behaivor onto your pain. Apologize for being hurtful, not for your circumstances.