Under which condition is a sick person legally permitted to perform their obligatory prayer sitting down?

The Sick Person's Prayer (صلاة المريض)