All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
The general rule is that it is permissible to pray voluntary prayers while sitting or lying down. Moreover, it is recommended for the one lying down to perform it while on their right side, even if they are capable of standing. Sheikh Sa'id Ba 'Ashin al-Shafi'i, may Allah have mercy on him, said: "It is permissible for the person capable of standing to perform voluntary prayers while sitting or lying down, by consensus of the scholars, due to the abundance of voluntary prayers. Nevertheless, it is preferable for the person lying down to perform the prayer while on their right side." However, the one sitting down receives half the reward of the one standing, and the one lying down receives half the reward of the one sitting down. This is based on the narration from Imran ibn Husain who said that he asked the Prophet about a man who prays sitting, and he replied, “If he prays standing that is more excellent; but one who prays sitting has half the reward of one who stands, and one who prays lying down has half the reward of one who sits.” {Transmitted by Bukhari}. If someone is unable to stand, their reward is not diminished. Imam al-Shirbini, may Allah have mercy on him, said: "The reduction in reward for sitting or lying down occurs when the person is capable of standing up, otherwise, nothing is diminished from their reward." {Moghni Al-Mohtaj, 1/P.352}.
If someone performs voluntary prayers while sitting or lying down and they are capable of assuming the posture of bowing and prostration, then they must perform the prostration in the usual manner, which includes placing the forehead, palms, knees, and toes on the ground, and not by gesturing. The posture for bowing while sitting involves leaning forward so that their forehead aligns with what is beyond their knees, at the very least. The ideal position is aligning with the place of their prostration. Imam al-Shirbini, may Allah have mercy on him, said: "Then the person praying while sitting leans forward for bowing in a way that their forehead aligns with what is beyond their knees, which is the minimum for bowing. The ideal is aligning with the place of their prostration." {Moghni Al-Mohtaj, Vol.1/P.350}. As for the person who prays while lying down and is capable of bowing and prostrating, they should bow and prostrate like the person sitting, and gesturing is not acceptable. Sheikh Sa'id Ba 'Ashin al-Shafi'i, may Allah have mercy on him, said: "If someone prays while lying down and is capable of bowing and prostrating, then it is obligatory for them to do so without gesturing." {Bushra Al-Kareem, P. 202}.
In conclusion, if someone performs voluntary prayers while sitting or lying down and is capable of standing, their prayer is valid. They must perform the bowing (Ruku') from the sitting position by leaning forward so that their forehead aligns with what is beyond their knees, at least, or ideally aligning with the place of their prostration. They should then perform the prostration in its usual manner, and gesturing is not acceptable. And Allah the Almighty knows best.