Definitely the best way to thank Math Stack Exchange is answering questions or mentioning MSE in the Acknowledge of your thesis.
There are other, good ways, to thank Math Stack Exchange which is making it a better place:
flagging inappropriate content
giving useful comments
upvoting questions and answers
Visiting this site https://math.meta.stackexchange.com/ every once in a while...
Helping the community grow (so more Mathematicians here, more students, more knowledge, more Mathematics, more happiness :)
For the last bullet, you could promoting through twitter or fb for example.
Also you can do it by communicating directly with the students, not necessarily mathematicians nor university students.
Or wearing clothes with the MSE logo;
a hoodie with the MSE logo or a shirt or something like that.