Sex in this Holy Sonnet 14 is a metaphor our speaker uses for the way in which God might demonstrate his love for the speaker. The speaker really wants a close, reciprocal relationship with God, and one of the only ways he can imagine a relationship like this working is through an encounter of a sexual nature.
While the identity of God breaks down from the first line, the speaker uses the whole sonnet to build consistently toward a sexual, rather than spiritual, resolution.