After you've completed your mediation session and selected 'Finish', you'll be directed to the Post Meditation screen. This screen displays profiles of other users who were meditating at the same time as you. If you wish to express your gratitude, you can tap on individual profiles and send a 'Thanks for Meditating' message. You can browse more profiles by swiping right.
However, keep in mind that not all users will have this feature enabled, in which case the option to send a message won't appear on their profile.
To ensure you have this feature enabled on your profile, check here.