The short answer is, the Prophet (S) did it.
A slightly longer answer is: It is narrated that Imam 'Ali (A) was asked the meaning of the first prostration. He replied: It signifies saying O Allah, you created us from this – meaning the earth. The meaning of lifting the head is from it, You brought us forth. The meaning of the second prostration is to it You will return us, and the meaning of lifting your head again is and you will bring us forth from it again.
This is referring to the Qur'anic verse: ‘From it (the earth) We created you, to it We shall return you and from it We shall bring you forth once again’ (20:55).