To the Ancient Greeks, it was important to root the Olympic Games in mythology. During the time of the ancient games their origins were attributed to the gods, and competing legends persisted as to who actually was responsible for the genesis of the games.
These origin traditions have become nearly impossible to untangle, yet a chronology and patterns have arisen that help people understand the story behind the games. Greek historian, Pausanias provides a story about the dactyl Heracles (not to be confused with the son of Zeus and the Roman god Hercules) and four of his brothers, Paeonaeus, Epimedes, Iasius and Idas, who raced at Olympia to entertain the newborn Zeus. He crowned the victor with an olive wreath (which thus became a peace symbol), which also explains the four-year interval, bringing the games around every fifth year (counting inclusively). The other Olympian gods (so named because they lived permanently on Mount Olympus) would also engage in wrestling, jumping and running contests.
Another myth of the origin of the games is the story of Pelops, a local Olympian hero. Oenomaus, the king of Pisa, had a daughter named Hippodamia, and according to an oracle, the king would be killed by her husband. Therefore, he decreed that any young man who wanted to marry his daughter was required to drive away with her in his chariot, and Oenomaus would follow in another chariot, and spear the suitor if he caught up with them. Now, the king’s chariot horses were a present from the god Poseidon and therefore supernaturally fast. The king’s daughter fell in love with a man called Pelops. Before the race however, Pelops persuaded Oenomaus’ charioteer Myrtilus to replace the bronze axle pins of the king’s chariot with wax ones. Naturally, during the race, the wax melted and the king fell from his chariot and was killed. After his victory, Pelops organized chariot races as a thanksgiving to the gods and as funeral games in honor of King Oenomaus, in order to be purified of his death. It was from this funeral race held at Olympia that the beginnings of the Olympic Games were inspired. Pelops became a great king, a local hero, and he gave his name to the Peloponnese.
One (later) myth, attributed to Pindar, states that the festival at Olympia involved Heracles, the son of Zeus: According to Pindar, Heracles established an athletic festival to honor his father, Zeus, after he had completed his labors.
The patterns that emerge from these myths are that the Greeks believed the games had their roots in religion, that athletic competition was tied to worship of the gods, and the revival of the ancient games was intended to bring peace, harmony and a return to the origins of Greek life.
Source: Wikipedia