I heard that popping fingers in the prayer met whether it's after or before prayer, is not good. Is that correct? Any reference would be appreciated.
First of all to have a ruling about prayer mats in Islam. Prayer mats should be introduced as something rather essential for praying or for the prayer in Islam. Which is not the case. In fact whether you pray on the mat or on a ground is irrelevant as long as the ground you pray on is tahir.
Secondly as @MuziburUllah rather correctly said whatever you do during the prayer, which has no direct link to acts of the prayer could be regarded as sinful (depends on the acts and movements).
So as long as you don't do any of these things during the prayer, there's nothing wrong. However let's assume you do this in a mosque that could be regarded as disrespectful as even if you ended your prayer or are not praying you are in a place of worship a house of God (Allah).
Anything that is disrespectful during namaz is haram and, moreover, given that in namaz one's attention should be upon Allah, that is to be mindful of Him, popping fingers is inattentive and so haram.
@Medi1Saif: But he does say that he's on the prayer mat and that signifies that ones attention ought to be on prayer.