The Mishna Berura writes that one may not talk in a bathroom for reasons of tzniyus, therefore if one is in the bathroom for reasons other than to relieve himself (for example to brush his teeth) he may talk. The Arizal adds an additional reason, that it is dangerous to talk in the bathroom because of sheidim. HaRav Ovadia Yosef in Yabia Omer 8:1 based on the Mor U'Ketzia writes that today since sheidim are not found, it is permitted to talk even in the bathroom (when there is no tzniyus issue).
A merchatz is discussed in Shulchan Aruch OC 85, where it says one may not say divrei Torah or Hashem's name in a merchatz. Apparently other, mundane speech is permitted. Presumably there is neither an issue of tzniyus nor sheidim in a mikva or bathhouse.