The Zohar (end of parashat shemot) asks how Moshe rabbeinu knew that Har Sinai was Har ha-elokim? In answer it explains that both Har Sinai and Moshe rabbeinu were waiting since he creation of the world to fulfill their purpose, matan Torah. So that when Har Sinai sensed Moshe rabbeinu nearby, it jumped closer to him just as an iron filing jumps towards a magnet. When Moshe saw the mountain jump to him, he also jumped to the mountain when he recognized it was Har ha Elokim. The rest is history.