The Exodus from Egypt, and the first celebration of Passover the same night (Exodus ch.12) was about two months before the covenant at Sinai (Exodus ch.19 and 24). The connection is that the Exodus, as great as it was, served as just a backdrop and preparation for an even greater event, which was when God gave the Torah at Mount Sinai (the Sinai covenant).
On Shavuoth, Jews celebrate the Giving of the Torah by God. By so doing, they reiterate their Covenant made at Sinai.
The custom is not to pray all night, but to study all night. Shavuot is considered to be the anniversary of the Giving of the Torah at Mount Sinai. Tikkun Leil Shavuot is the custom of staying up the entire night (leil) of Shavuot studying with the community in order to reexperience standing at Sinai.
In the Sinai Covenant, God made a covenant with the Israelites through Moses on Mount Sinai. The covenant included the giving of the Ten Commandments and other laws which the Israelites were to follow. It established rules for the Israelites to live by, and outlined the consequences for obedience and disobedience.
Moses
It originated at Mt. Sinai. So the "when" was about 3,500 years ago. What most people do not think of is that Shavuot is 50 days after Passover. Passover was the beginning of the Exodus from Egypt.
Judaism. At the time of the covenant itself, it was simply called the Torah.
It is known as Shavuot in Hebrew, or the Feast of Pentecost in Christian terminology.
The Jews must obey the Torah and God will treasure them and give them peace prosperity and offspring.
This is the point in the Biblical narrative that the law was given to the people of Israel at Mt. Sinai. It is the culmination of all other covenants.
The second covenant was not made between God and Abraham. It was made between God & Moses at Mount Sinai. This is where the ten commandments originated.
Covenants are contracts between God and mankind. They are consistent and ever-enlarging beginning from the Noahic Covenant, the Abrahamic Covenant, the Mosaic Covenant (aka Sinai Covenant), the Davidic Coventant, and the capstone or culminating New Covenant. Though men break covenants, God keeps His promises.
The Ten Commandments are traditionally kept in the Ark of the Covenant. According to biblical accounts, they were inscribed on two stone tablets given to Moses on Mount Sinai.
Judaism is defined by a covenant between the Jewish people and God. Jewish tradition holds that this covenant was made at Mount Sinai, and that the Torah is the document that defines the terms of the covenant. The tradition identifies 613 mitzvot, commandments, in the Torah, and that Jews are obligated by these commandments as their part of the covenant.