SaṅghādisesakaṇḍaSaṅghādisessikkhāpada

Vinayapiṭaka · Bhikkhu Vibhaṅga (1) · Vol. 1 · Section 344

[344] There is no offense (anāpatti): for one whose emission occurs in a dream; for one who has no intention of causing emission; for one who is insane; for one whose mind is deranged; for one overwhelmed by pain; and for the first offender (ādikammika).

English translation from the Pali (Siam Raṭṭha edition) — under review, not for citation.

This passage also appears in 5 other places