Shaykh al-Islām, the eminent scholar, master of hadith, independent jurist, and mufti to the people, Taqī al-Dīn Ahmad ibn Taymiyyah, replied in his own handwriting:
Praise be to Allah.
The answer to this question rests on two principles: first, what Islamic law requires; and second, what the pledge and vows entail.
As for the first, what is prescribed and commanded, and what Allah and His Messenger—may Allah bless him and grant him peace—love, is moderation in worship. The Prophet, may Allah bless him and grant him peace, said:
“Follow a moderate course; follow a moderate course.”
He also said:
“This religion is firm. No one overburdens himself in religion without being overcome by it. So seek help by travelling in the early morning, the late afternoon, and for part of the night. Be moderate, be moderate, and you will reach your destination.”
Both reports are in al-Sahīh.
Ubayy ibn Ka'b said:
“Moderation in following the Sunnah is better than strenuous effort in following innovation.”
Whenever an act of worship causes a person harm that prevents him from fulfilling an obligation more beneficial to him than that act, it is forbidden. Examples include fasting in a way that leaves him too weak to undertake the earning required of him, impairs the reasoning or understanding required of him, or prevents him from undertaking obligatory jihad.