How is it that a woman is allowed to recite a berachah in the mikvah?
The Mishnah Berurah (45:5), citing from a number of authorities, explains that although we are careful not to make other berachos in the mikvah, the berachah of tevillah is an exception to the rule, and is made even in the mikvah.
The reason why we are lenient for this is because the mikvah (and in particular a ladies mikvah) is generally a clean place, and does not have the same zuhama (dirty air) of a bathhouse.
Some poskim make a distinction between hot water and cold water (Kesef Mishnah in the name of Rabbeinu Manoach), and the Mishnah Berurah notes this distinction (see also Peri Megadim 84:2; see also Pischei Teshuvah, Yoreh De’ah 200:3)
The water, however, can be warm, and only actually hot water will constitute a problem according to this opinion.
The general custom is to recite the blessing even in hot water, and the Darkei Teshuvah (200) explains that somebody who is actually in the water is considered as being in a separate place to the rest of the mikva. However, for a men’s mikva, which is generally more dirty, this should not be relied on.