Sayyiduna Imran bin Husain (may Allah be pleased with him) narrates: I was suffering from hemorrhoids, so I asked the Noble Prophet (peace and blessings be upon him) about it. He said: "Perform the prayer standing; if you cannot do so, then sitting; and if you cannot do that, then lying on your side."
Hadith Referenceسنن الدارقطني / كتاب الصلاة / 1425
Hadith Takhrij«أخرجه البخاري فى ((صحيحه)) برقم: 1115، 1116، 1117، وابن خزيمة فى ((صحيحه)) برقم: 979، وابن حبان فى ((صحيحه)) برقم: 2513، والحاكم فى ((مستدركه)) برقم: 1190، والنسائي فى ((المجتبیٰ)) برقم: 1659 ، وأبو داود فى ((سننه)) برقم: 951، 952، والترمذي فى ((جامعه)) برقم: 371، 372، وابن ماجه فى ((سننه)) برقم: 1223، 1231، والدارقطني فى ((سننه)) برقم: 1425، 1426، 1427، 1428، 1561، وأحمد فى ((مسنده)) برقم: 20133»