Offering Two Rak`ahs of Thankfulness: OK?

What is the ruling of prostration of thankfulness? When could one perform it? Is it a condition ...