Shortening the Prayers (At-Taqseer)
Bukhari :: Book 2 :: Volume 20 :: Hadith 218
Narrated 'Imran bin Husain:
had piles, so I asked the Prophet about the prayer. He said, "Pray while standing and if you can't, pray while sitting and if you cannot do even that, then pray Lying on your side."