Grendel’s mother occupies an underground battle hall that is far below the surface of the black sea.
What Grendel's mother represents is a primal, perverted maternal force. She dwells in a horrible infested lake, and it is a genuine test of Beowulf's courage to plunge into it in pursuit of her. (enotes character analysis, Grendel’s mother)
The key is this passage:
He soon noticed that he was now in some strange cavern where no water could harm him and the fangs of the depths could never reach him through the roof. (ch 22, p. 28)
There are different translations of this epic, which might lead to your confusion, but I will use the one provided by enotes. Beowulf basically follows Grendel’s mother into her lair, because he knows she cannot get through his armor. The lair is definitely underground.
She was doomed to dwell in dreary waters and cold streams ever since Cain cut down his only brother, his father's son, with his sword-edge. (ch 19, p. 25)
It seems the Beowulf also realized that Grendel’s mother’s lair was well under ground, because “the white helmet that guarded his head was destined to dare the pool's depths and face the raging waves” (ch 21, p. 27)
The roof of the battlehall protects Beowulf from both the heat of the water and the other creatures. Beowulf attacks with Hrunting, but to no avail; nor is his helmet effective in protecting him from Grendel’s mother. (enotes summary, lines 1251 to 1650)
There is also some evidence that although he had the helmet’s strength, he received some divine intervention. This is common in the hero’s journey, as the epic hero is often reborn.
The life of the son of Ecgtheow, prince of the Geats, would have ended there underneath the wide earth if his armor of war, hard net of battle, had not aided him; and the Holy God, wisest Maker, wielded the victory. The heavenly Ruler championed his cause, and he soon stood on his feet again. (ch 22, p. 28)