Milton is unhappy as the poem opens because his blindness makes it difficult for him to serve God in the way he would like. This is primarily through his writing. As Milton composes his sonnet, however, he comes to the realization that God doesn't need or necessarily want his great "work[s]" or his "gifts." Instead, God wants him to bear the burden of his blindness graciously ("bear his mild yoke") and focus on obeying and serving God however God directs him. Milton notes that many thousands of people travel over land and sea to do God's will without "rest" but that many others are meant to simply wait for God's directions. He ends the sonnet by stating,
They also serve who only stand and wait.
The sonnet recognizes the enormous urge people have to serve God or the world by actively doing something. For example, Milton tries to explain "the ways of God to men" by the labor of writing the long epic poem Paradise Lost. He still has the restless urge to be doing more and is initially fretful that he is impeded. However, he is wise enough to realize that he can serve God merely by being. God, he realizes, doesn't want whatever service we haplessly decide, from our own wills, to give to him; God wants us to do what he wants us to do. Sometimes that is simply to wait quietly for his commands.
When Milton ends with his famous line, "They also serve who only stand and wait," he is referring to the idea that God is like a king who can employ many servants to do whatever He wishes whenever He decides to use them.
Is kingly; thousands at his bidding speed
And post o'er land and ocean without rest...
There are some servants in royal palaces who do nothing but stand at attention at their posts wearing livery and simply making themselves available, since this is what the king is employing them to do. Milton is suggesting that a person like himself is already doing exactly what God wants him to do, because everything is determined by God. Therefore Milton has no need to ask questions such as why he is blind or what God expects of him. All he has to do in order to serve God is to stand patiently and wait like a servant posted in a king's palace, who may or may not be sent on errands or told to perform services of one kind or another. In other words, Milton is expressing unquestioning faith in the will of God.
After losing his eyesight, John Milton wrote On His Blindness, which is an autobiographical account of his feelings and position now that his sight has gone. He opens the poem with a reflection on having lost his sight quite young and therefore certainly before reaching his desired level of achievement. The reader can sense his uneasiness at the thought of not being able to write poetry anymore.
He wonders about his options and God's expectations, even questioning whether God would make a blind man work in daylight. Now that he is afflicted, he is insecure and tries to reassure himself that he can still achieve great things in the glory of God. He worries that his blindness may prevent him from attaining his goals and making use of his "talent," whether that is his ability to write poetry or a play, or the biblical talents which allude to knowing how to make the best of what one is given. Milton does add that he is now "more bent to serve," suggesting that he will make every effort to "present my true account." This is one way to serve God. It is also possible to "stand and wait."
Milton can also serve God by being patient and also by accepting any difficulties he may experience. Milton is saying that those who "bear his mild yoke" and who accept whatever God has in store should do so with dignity, which will prove their commitment and loyalty to God, resulting in an agreeable way to serve God.