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).
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.
The anchor of the new Sinai Covenant was the Ten Commandments, which were given by God to Moses on Mount Sinai. These commandments served as the moral and ethical foundation for the Israelites, outlining their responsibilities towards God and each other. The Covenant also included various laws and regulations governing social behavior, worship practices, and rituals, all aimed at establishing a just and harmonious society. Overall, the Covenant was a binding agreement between God and the Israelites, signifying their commitment to follow His laws and live in accordance with His will.
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.
According to the Priestly writer's scheme of the development of covenants, the sign associated with the Sinai covenant is the Sabbath. This covenant, established between God and the Israelites at Mount Sinai, emphasizes the importance of rest and the holiness of the Sabbath as a perpetual sign of the relationship between God and His people. The observance of the Sabbath serves as a reminder of God's creation and His covenantal promise.
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.