Like many sonnets in Sir Philip Sidney’s Astrophil and Stella sonnet sequence, sonnet 40 presents Astrophil as a kind of idolator who blames Stella, the object of his idolatry, for the suffering he endures. Instead of accepting responsibility for his own blameworthy thoughts and desires, Astrophil tries to make Stella seem at fault.
The fact that Astrophil “lie[s] and groan[s]” (1) as a result of his obsession with Stella implies that his love for her is not true, godly, spiritual love (known as caritas, or charity) but is instead selfish physical desire (known as cupiditas, or cupidity). Caritas would not cause the kind of sighing and groaning Astrophil describes; it would, instead, be a source of deep and genuine pleasure (the kind of pleasure attained by the speaker in the final third of Edmund Spenser’s Amoretti sequence).
Sidney’s sequence, instead, most resembles Petrarch’s Rime Sparse sonnet sequence in its emphasis on a speaker who makes the mistake of paying one of God’s creatures the kind of devotion that should be paid only to God. (For more on this kind of interpretation of Petrarch and Sidney, see, for example, Thomas Roche’s book Petrarch and the English Sonnet Sequences).
Like the speakers of many sonnets influenced by the Italian poet Francesco Petrarca (“Englished” as “Petrarch”), Sidney’s speaker suffers while other people are at peace: “while others sleep,” Sidney’s speaker “moan[s]” (4). And, like the speakers of those other sonnets, Astrophil blames his suffering on Stella and her virtue:
Alas, if from the height of Virtue's throne,
Thou canst vouchsafe the influence of a thought
Upon a wretch, that long thy grace hath sought;
Weigh then how I by thee am overthrown . . . (5-8)
It is, of course, only the unworthy nature of Astrophil’s desires that causes him to suffer. If his desires, like hers, were truly virtuous, no suffering would ensue. It is precisely because Stella recognizes the unworthy nature of Astrophil’s desires that she rejects him. Astrophil is not “overthrown” by Stella; instead, he is “overthrown” by himself, because he seeks the wrong kind of “grace” from her. He is a “wretch” not in the sense that he is a victim of Stella but in the sense that he is a victim of his own uncontrolled erotic impulses.
The entire sonnet, in short, can be read ironically, which is almost surely how Sidney intended all these sonnets to be read (for more on this kind of interpretation see, for instance, the insightful articles of Alan Sinfield).
The final three lines of the sonnet seem especially ironic:
Since then thou hast so far subdued me,
That in my heart I offer still to thee,
Oh do not let thy Temple be destroyed.
Sidney’s original readers, of course, would have known that the body was considered the temple of God, not the temple of Stella or of any other human being (1 Corinthians 6:19; KJV).
Astrophil himself knows that his obsession with Stella is idolatrous. As he himself puts it in sonnet 5 of this sequence:
It is most true, what we call Cupid's dart,
An image is, which for ourselves we carve:
And, fools, adore in temple of hour heart,
Till that good God [that is, Cupid] make Church and churchman starve. (5-8)
By sonnet 40, however, Astrophil is still in the grip of his idolatry, and he remains so throughout the sequence. Unlike the speaker in the Amoretti, he never learns to love properly, and thus his "love" is never reciprocated.
[See also: http://www.enotes.com/sir-philip-sidney-criticism/sidney-sir-philip/thomas-p-roche-jr-essay-date-1982 ]