First: stand and perform actual bowing and prostration when able.
Second: if standing is impossible, sit but still perform actual bowing and prostration.
Third: if bowing and prostration are impossible, gesture with the head while sitting.
Fourth: if sitting too is impossible, lie down and gesture with the head.
One progresses to the next accommodation according to actual inability, not mere convenience.