All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
In the prostration, the worshipper's nose and forehead must touch the ground. Placing the forehead and nose on the ground is essential in order to observe the pillar of prostration in the prayer. However, if the mosque is overcrowded and there is no room for the worshippers to perform prostration on the ground, then it is allowed for them to prostrate on the backs of those in front of them. The Prophet, sallallaahu ‘alayhi wa sallam, said: "If it becomes very crowded, a person among you is to prostrate on the back of his brother." [Ahmad and Shu‘ayb Al-Arnaa’oot: Saheeh]
Ibn Qudaamah said in Al-Mughni, "In case of an overcrowded mosque, if the worshipper can perform prostration on the back or feet of the worshipper in the row in front of him, he is obliged to do so and it is enough for him (i.e. he would have fulfilled the pillar of prostration in the prayer). This is the opinion of Imaam An-Nawawi, Abu Haneefah, Ash-Shaafi‘i, Abu Thawr and Ibn Al-Munthir . ‘Ataa', Az-Zuhri and Maalik believed that the worshipper in such a case should not do so."
Hence, the questioner should know that the worshipper should perform the prostration normally on the ground or on the back or feet of the worshipper in front of him although there is a difference of opinion amongst the scholars whether prostrating on the back or feet of another worshipper is sufficient or not, as was mentioned.
Allaah Knows best.