It is traditional to spend the entire night of Shavuos reciting or studying Torah until daybreak. This has its origin in the Midrash that relates that some of the Israelites overslept on the morning of the revelation at Sinai, and that Moses had to arouse them for the momentous event. It is generally assumed that denying ourselves sleep on this night is a kind of rectification for our ancestors' lethargy.
Far more important than being an atonement for our ancestors is the message this custom has for us. It is not unusual for us to fail to take advantage of opportunities. We too may "oversleep" for momentous occasions.
Whether opportunity knocks only the proverbial once or several times, each missed opportunity is a loss we can ill afford. Some people regret having overlooked opportunities to buy properties that subsequently escalated greatly in value. Since we lack prophetic foresight, we can hardly fault overselves for this. But there are opportunities which do not require prophecy, such as when Moses tells the Israelites that tomorrow morning there will be an unprecedented Divine revelation, and that they will be hearing the words of God directly from the Almighty Himself. Our Sages related this Midrash so that we should be aware of our vulnerability, that our inertia may result in our failure to take advantage even of a once-in-the-history-of-the-world event.
To avoid overlooking opportunities, we must forever be on the alert. Habit and routine are our greatest impediments. We may have opportunities for spiritual growth today that were not there yesterday, and if we become complacent, we may not notice them.