This is an English expression which is very commonly used in conversation. A person never wants to be feeling “out of sorts” but it is important to know when it is suitable to use it!
The phrase is most commonly used in response to the question “how are you?” It is used to express the fact that someone is feeling not quite right. It can relate to either mental or physical health and does not suggest an extreme illness, rather a mild problem. Another expression which can be used to express a similar feeling is “under the weather.”
It is widely believed that the expression dates to the 17th century and to the act of typesetting. The “sorts” were the letters used by the typesetter and thus if the blocks were “out of sorts” this would not make the typesetter happy as they would no longer be able to complete their work.
An example of the use of the expression can be found in a quote from Samuel Beckett which reads “I was out of sorts. They are deep, my sorts, a deep ditch, and I am not often out of them.”