Just souls surprised by death, for example, during sleep, or at a moment when they do not have sufficient control of reason, were not able at the last moment to make an act of contrition, a meritorious act which would have obtained the remission of venial sins. Such sins are remitted to them by the act of charity and contrition which they make immediately after death, at the moment of the particular judgment. This act indeed is no longer meritorious. But it is an act of charity and contrition which suffices to remit venial sins, though the soul must still endure the suffering due to these faults. Such is the teaching of St. Thomas, admitted also by Suarez, and by the generality of theologians.
This doctrine is very probable. Nothing prevents the separated soul from making at once an act of repentance. It is no longer hindered by the passions. General contrition would suffice for the remission of these sins. But, under the light of the particular judgment, the soul sees all its sins singly and consequently repents of each singly. This is a wonderful complement of the act of contrition made on earth, although that complement is not meritorious. Certainly it is better to make this act of contrition before death. To sacrifice life in union with the Masses celebrated at the moment of death would have been meritorious. But, while it is not now meritorious, it obtains the remission of venial sins. Such a soul is a saint, because all its venial sins are at once remitted, and it can no longer sin. This is truly a beautiful doctrine.
--Reginald Garrigou-Lagrange, Life Everlasting