For the believers, the condition for gaining this most significant and valuable advantage is to perform the obligatory prayers, repent for the sins that were the cause of their imprisonment, and offer thanks in patience. For sure, prison is an obstacle to many sins: it does not provide the opportunity for them.
Second Point:Just as the cessation of pleasure causes pain, so also does the cessation of pain give pleasure. Indeed, on thinking of past happy, enjoyable days, everyone feels a pang of regret and longing, and says: "Alas!", and recalling calamitous, unhappy days of the past, experiences a sort of pleasure since they are passed, and says: "Praise and thanks be to Allah, that calamity has left its reward and departed." He breathes a sigh of relief. That is to say, an hour’s temporary pain and sorrow leave behind a sort of pleasure in the spirit, while a pleasurable hour leaves a pain.
Since the reality is thus; and since past calamitous hours together with their pains are no longer existent, and future distressing days are at the present time non-existent, and there is no pain from nothing, to continually eat bread and drink water today, for example, because of the possibility of being hungry and thirsty in several days’ time, is most foolish. And in just the same way, to think now of the past and future unhappy hours, which simply do not exist, and to show impatience, and ignoring one’s faulty self, to moan as though complaining about Allah is also most foolish.