Praise be to Allah.
Complaints should be made only to Allah, may He be exalted. This is part of being a true slave of Allah, putting one’s trust in Him alone and expressing one’s need of one’s Lord. It is part of relying on Him alone and being completely independent of people.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Complaints should be made only to Allah, may He be exalted, as the righteous slave [Ya‘qoob (peace be upon him)] said: (interpretation of the meaning): “I only complain of my suffering and my grief to Allah, and I know from Allah that which you do not know” [Yoosuf 12:86].
End quote from Minhaaj as-Sunnah an-Nabawiyyah (2/244).
Ibn al-Qayyim (may Allah have mercy on him) said:
In His Book, Allah, may He be glorified and exalted, has enjoined seemly patience, seemly forgiveness and seemly shunning. I heard Shaykh al-Islam Ibn Taymiyah (may Allah sanctify his soul) say: Seemly patience is that in which there is no complaint, and which is not accompanied by any complaint. Seemly forgiveness is that in which there is no rebuke, and seemly shunning is that in which there is no intent to do harm.
Complaining to Allah, may He be glorified and exalted, is not contrary to patience, for Ya‘qoob (peace be upon him) promised to practice seemly patience, and when a Prophet makes a promise he does not break his promise. And later on he said: (interpretation of the meaning): “I only complain of my suffering and my grief to Allah” [Yoosuf 12:86]. Similarly with regard to Ayyoob, Allah tells us that He found him patient, even though he said (interpretation of the meaning): “Indeed, adversity has touched me, and you are the Most Merciful of the merciful” [al-Anbiya’ 21:83].
What is contrary to patience is complaining about Allah [that is, complaining to people about what He has decreed], not complaining to Allah. One of the scholars saw a man complaining to another of poverty and need, so he said: Are you complaining about One Who shows you compassion to one who does not show you compassion? Then he said in verse:
When a calamity befalls you, bear it with patience, like a man of dignity, for Allah knows best about your situation.
But if you complain to the son of Adam, then you are only complaining about the Most Merciful to one who has no mercy.
End quote from Madaarij as-Saalikeen (2/160).
He also said:
Complaining is of two types, the first of which is complaining to Allah. This is not contrary to patience, as Ya‘qoob said (interpretation of the meaning): “I only complain of my suffering and my grief to Allah” [Yoosuf 12:86], even though he said: “so patience is most fitting for me” [Yoosuf 12:18]; and Ayyoob said: “Indeed, adversity has touched me”, yet Allah described him as being patient. The leader of the patient (that is, the Prophet, blessings and peace of Allah be upon him) said: “O Allah, to You I complain of my weakness, little resource and lowliness before men.”
The second type is the complaint, whether it is implicit or explicit, of one who is faced with calamity. This cannot coexist with patience and in fact is contrary to it and invalidates it. There is a difference between complaining about Allah [that is, His decree] and complaining to Allah.
End quote from ‘Iddat as-Saabireen (p.17).
As-Sa‘di (may Allah have mercy on him) said:
Complaining to Allah is not contrary to patience; rather what is contrary to patience is complaining to other people.
End quote from Tafseer as-Sa‘di (p. 411).
Complaining to Allah means that when a person is stricken with something, or calamity befalls him, or he finds himself in extreme need of something, he complains to Allah alone, addresses his need to Him and relies on Him – as the Prophets (peace be upon him) did with their needs and complaints. Thus he remembers his Lord, calls on Him, beseeches Him, repents and turns to Him, and seeks to draw near to Him by doing various acts of worship, because that is part of complete servitude and putting one’s trust in Allah.
And Allah knows best.