Mahanaim is supposedly located along the Jabbok across from Penuel and there seems to have been a couple traditions associated with the origin of its name, which in Hebrew is a dual noun meaning “camps” or “two camps.”
Apparently the Elohist tradition from the north accredits Jacob with its naming because, as with his vision in Bethel when he left the land of Canaan (Gen 28:11-22), so too here upon entry Jacob sees angels of God: “‘This is a camp (mahaneh) of God’ he said and called that place Mahanaim” (Gen 32:3). In other words it is the “twin camp” of Penuel, being in close proximity, where Jacob will also encounter God, a god, or a man (Gen 32:23-33).
Although the Yahwist tradition does not mention the place name Mahanaim, the name’s origin is nevertheless accounted for via a different tale—namely it is the very site where Jacob, fearing his encounter with Esau, divided his people into two camps (mahanoth).
Not incoincidentally the narrative setting for both these stories is the northeastern border region between Israel and Aram. They serve to legitimate the possession of this region in a later time period by presenting an Israelite ancestor, here Jacob-Israel, as naming the place and establishing a cultic site on its land.