I have heatmats stuck to the bottom of my glass tanks, I find that the best stuff I've used so far to keep them stuck on is double-sided mounting tape. Its the stuff that's thin foam that's sticky on both sides. Everything else I"ve used has just turned into a sticky mess and hasn't held properly.
I run strips of it along the clear mat edges that aren't heating element. The thickness of the tape allows a very thin gap between the glass and the mat, but the heat transfers very well anyway.