Deuteronomy 23:9-11 New King James Version (NKJV)
Cleanliness of the Campsite
9 “When the army goes out against your enemies, then keep yourself from every wicked thing. 10 If there is any man among you who becomes unclean by some occurrence in the night, then he shall go outside the camp; he shall not come inside the camp. 11 But it shall be, when evening comes, that he shall wash with water; and when the sun sets, he may come into the camp.