I answer that, Nocturnal pollution may be considered in two ways. First, in itself; and thus it has not the character of a sin. For every sin depends on the judgment of reason, since even the first movement of the sensuality has nothing sinful in it, except in so far as it can be suppressed by reason; wherefore in the absence of reason's judgment, there is no sin in it. Now during sleep reason has not a free judgment. For there is no one who while sleeping does not regard some of the images formed by his imagination as though they were real, as stated above in the FP, Question [84], Article [8], ad 2. Wherefore what a man does while he sleeps and is deprived of reason's judgment, is not imputed to him as a sin, as neither are the actions of a maniac or an imbecile.
Secondly, nocturnal pollution may be considered with reference to its cause. This may be threefold. One is a bodily cause. For when there is excess of seminal humor in the body, or when the humor is disintegrated either through overheating of the body or some other disturbance, the sleeper dreams things that are connected with the discharge of this excessive or disintegrated humor: the same thing happens when nature is cumbered with other superfluities, so that phantasms relating to the discharge of those superfluities are formed in the imagination. Accordingly if this excess of humor be due to a sinful cause (for instance excessive eating or drinking), nocturnal pollution has the character of sin from its cause: whereas if the excess or disintegration of these superfluities be not due to a sinful cause, nocturnal pollution is not sinful, neither in itself nor in its cause.
A second cause of nocturnal pollution is on the part of the soul and the inner man: for instance when it happens to the sleeper on account of some previous thought. For the thought which preceded while he was awake, is sometimes purely speculative, for instance when one thinks about the sins of the flesh for the purpose of discussion; while sometimes it is accompanied by a certain emotion either of concupiscence or of abhorrence. Now nocturnal pollution is more apt to arise from thinking about carnal sins with concupiscence for such pleasures, because this leaves its trace and inclination in the soul, so that the sleeper is more easily led in his imagination to consent to acts productive of pollution. In this sense the Philosopher says (Ethic. i, 13) that "in so far as certain movements in some degree pass" from the waking state to the state of sleep, "the dreams of good men are better than those of any other people": and Augustine says (Gen. ad lit. xii, 15) that "even during sleep, the soul may have conspicuous merit on account of its good disposition." Thus it is evident that nocturnal pollution may be sinful on the part of its cause. on the other hand, it may happen that nocturnal pollution ensues after thoughts about carnal acts, though they were speculative, or accompanied by abhorrence, and then it is not sinful, neither in itself nor in its cause.
The third cause is spiritual and external; for instance when by the work of a devil the sleeper's phantasms are disturbed so as to induce the aforesaid result. Sometimes this is associated with a previous sin, namely the neglect to guard against the wiles of the devil. Hence the words of the hymn at even: "Our enemy repress, that so our bodies no uncleanness know" [*Translation W. K. Blount].
On the other hand, this may occur without any fault on man's part, and through the wickedness of the devil alone. Thus we read in the Collationes Patrum (Coll. xxii, 6) of a man who was ever wont to suffer from nocturnal pollution on festivals, and that the devil brought this about in order to prevent him from receiving Holy Communion. Hence it is manifest that nocturnal pollution is never a sin, but is sometimes the result of a previous sin.