What you did is not regarded as mocking the prayer, because it was only imitating the movements of the prayer, and was not intended by way of mockery. But the Muslim must respect the prayer, and some of the jurists stated that it is prohibited to do that, and they regard it as a very serious matter.
Ibn Rajab said in his commentary on the hadith of Malik ibn al-Huwayrith, who said: “I lead you in prayer, not intending to pray, but I want to show you how I saw the Prophet (blessings and peace of Allah be upon him) pray…” Narrated by al-Bukhari, 790.
[Ibn Rajab said:] It is not valid to interpret his words according to the apparent meaning, and say that he did not intend to pray at all – rather, he stood, sat, bowed and prostrated when not intending to pray – because that is not permissible.
End quote from Fat-h al-Bari by Ibn Rajab, 6/111.
Shaykh Ibn `Uthaymin (may Allah have mercy on him) was asked:
There is someone who imitates the prayer, whether it is the funeral prayer or prayer for rain or the obligatory prayer. For example, there may be people in a gathering and someone says the takbir – for example – as if he is offering the funeral prayer, and he recites al-Fatihah as if he is just imitating the prayer and nothing else. Is this regarded as mocking the prayer?
He replied: That is not mocking the prayer, unless he intends to mock it, because his intention may be to teach. But if there is no intention to teach, is that regarded as mocking the prayer or not?
We say: in principle, it is not mocking the prayer.
But nevertheless, he should be emphatically told not to do that.
Hence, we forbid what some people do when acting [on TV and the like], when they stand (as if in prayer) and another person comes and talks to him whilst he is praying and so on. We absolutely and emphatically forbid this.
End quote from Liqa’ al-Bab al-Maftuh, 234/10).
And Allah knows best.