Both Twelfth Night and Sonnet 73 celebrate love that is based on more than physical appearance or plausible attraction. Both Orsino and Olivia see something lovable in Cesario that they can't quite explain based on the "young man's" physical appearance. Both learn to appreciate something more inward and lasting than youth and beauty. The "cover" of disguise Viola adopts is capable of revealing something more truthful about her inner self, allowing her to express hew own longing for love. Because Orsino thinks he cannot love Cesario, he reveals the inner book of his love as well. Because Olivia does not feel threatened by this younger servant to Orsino, she can reveal her playfulness and openness to folly as well, not fearing she will lose her self in love of another, more powerful man like Orsino. Disguise is the venue for inner truth to be revealed. When the disguise is revealed at the end of the play, both Orsino and Olivia feel they have already read the contents of Viola/Cesario/Sebastian's heart.
The same is true in the sonnet, where the older speaker acknowledges his loss of youth and beauty yet is profoundly appreciative of the young man who looks upon the diminishing beauty, energy, and life in the speaker yet continues to love:
This thou perceiv'st, which makes thy love more strong,To love that well which thou must leave ere long.
In Shakespeare's gender bending Twelfth Night, examples of the pitfalls of judging a book by its cover, or, in other words, being deceived by surface appearances, abound. For example, Olivia falls in love with Viola, who is disguised as a male, Cesario. This is definitely a case of judging a book by its cover, because Cesario is not, despite outward appearances, a man. (It could be argued that this shows that love transcends gender.) In another "don't judge a book by its cover" moment, the conceited Malvolio is tricked into thinking Olivia is in love with him when Maria deceives him by writing him love letters purportedly from Olivia. Finally, Olivia mistakes Sebastian for Cesario, which is maybe not such a stretch as he is Viola's twin. In any case, this mishap works in Olivia's favor by uniting her with her proper mate.
In Sonnet 73, the narrator speaks of getting old, stating
In me thou see'st the glowing of such fire
That on the ashes of his youth doth lie
Nevertheless, the sonnet argues that love shouldn't judge by appearances. Rather than fading or quieting with age, the lover's passion grows stronger because he realizes he doesn't have that much time left to be with the beloved in this world.
Sonnet 73 is about someone who loves a person who is getting old. According to the speaker in the sonnet, the love is stronger because the lover recognizes that they don't have long together. It is about someone who loves a person despite his outward appearance. So, people who are not judging the book by the cover.
In 12th Night, what is below the surface is more important than what is above. Olivia and Orsinio both judge books by their covers, so to speak, when they fall in love with people who are attractive on the outside but wrong for them in one way or another. Orsino likes Olivia's looks but he doesn't see (or care to see her character) and Olivia falls in love with Viola without realizing the "boy" she's fallen for is actually a girl. The truest love is the one between Orsinio and Viola for that is the love of friends who recongize and understand each other's true character. That kind of love is one that judges from the inside rather than outside appearances.