It is narrated from Sayyiduna Ibn Amr, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: "Whenever any person among the people suffers any physical pain, Allah commands His guardian angels to continue writing all the good deeds that My servant used to do every day and night, as long as he remains in My protection."