Nor do we, in saying these things, account wedlock as sin. But, since even the lawful intercourse of the wedded cannot take place without pleasure of the flesh, entrance into a sacred place should be abstained from, because the pleasure itself can by no means be without sin. For he had not been born of adultery or fornication, but of lawful wedlock, who said, Behold I was conceived in iniquities, and in sin my mother brought me forth. For, knowing himself to have been conceived in iniquities, he groaned for having been born in sin, because the tree bears in its branch the vicious humour which it has drawn from its root. Yet in these words he does not call the intercourse of the wedded iniquity in itself, but in truth only the pleasure of the intercourse. For there are many things which are allowed and legitimate, and yet we are to some extent defiled in the doing of them; as often we attack faults with anger, and disturb the tranquillity of our own mind. And, though what is done is right, yet it is not to be approved that the mind is therein disturbed. For instance, he had been angry against the vices of transgressors who said, My eye is disturbed because of anger. For, since the mind cannot, unless it be tranquil, lift itself up to the light of contemplation, he grieved that his eye was disturbed in anger, because, though assailing evil doings from above, he still could not help being confused and disturbed from contemplation of the highest things. And therefore his anger against vice is laudable, and yet it troubles him, because he felt that he had incurred some guilt in being disturbed. Lawful copulation of the flesh ought therefore to be for the purpose of offspring, not of pleasure; and intercourse of the flesh should be for the sake of producing children, and not a satisfaction of frailties. If, then, any one makes use of his wife not as seized by the desire of pleasure, but only for the sake of producing children, he certainly, with regard to entering the church or taking the mystery of the body and blood of the Lord, is to be left to his own judgment, since by us he ought not to be prohibited from receiving it who knows no burning though in the midst of fire. But, when not the love of producing offspring but pleasure dominates in the act of intercourse, married persons have something to mourn over in their intercourse. For holy preaching concedes them this, and yet in the very concession shakes the mind with fear. For, when the Apostle Paul said, Who cannot contain let him have his own wife, he straightway took care to add, But I speak this by way of indulgence, not by way of command. For what is just and right is not indulged: what he spoke of as indulged he showed to be a fault.
Furthermore it is to be attentively considered that the Lord in mount Sinai, when about to speak to the people, first charged the same people to abstain from women. And if there, where the Lord spoke to men through a subject creature, purity of body was required with such careful provision that they who were to hear the words of God might not have intercourse with women, how much more ought those who receive the Body of the Almighty Lord to keep purity of the flesh in themselves, lest they be weighed down by the greatness of the inestimable mystery! Hence also it is said through the priest to David concerning his servants, that if they were pure from women they might eat the show bread; which they might not receive at all unless David first declared them to be pure from women. Still a man who after intercourse with his wife has been washed with water may receive even the mystery of sacred communion, since according to the opinion above expressed it was allowable for him to enter the church.
Augustine's eleventh question: I ask also whether after an illusion, such is accustomed to occur in dreams, any one may receive the body of the Lord, or, if he be a priest, celebrate the sacred mysteries?
Answer of the blessed Pope Gregory: Such a one the Testament of the old law, as we have already said in the last section, declares indeed to be polluted, and does not allow to enter the church until the evening, or without being washed with water. But one who understands this not only with special reference to that people at that time, but also spiritually, will regard it under the same intellectual conception that we have spoken of before; namely, that he has, as it were, an illusion in a dream who, being tempted by uncleanness, is defiled in thought by true images. But he is to be washed with water in the sense of washing away the sins of thought with tears. And, unless the fire of temptation has passed away, he should feel himself to be guilty, as it were, until the evening.
Source: Register of Letters (New Advent)