Another interpretation of "Do not let your mouth bring guilt on your flesh" (Ecclesiastes 5:5): The Torah has spoken to you in clean language. If your wife has told you that she is a menstruant (niddah), do not bring sin upon your body by touching her. Do not say before the angel appointed over the formation of the child, "I sinned unwittingly, and I did not know." "Why should God be angry at your voice and destroy the work of your hands?" (Ecclesiastes 5:5) — these are the children who are stricken with plagues. Rabbi Acha said: If a man has relations with his wife while she is a menstruant, the children are stricken with leprosy (tzaraat). How so? If he had relations on the first day of her menstruation, the son born of them is stricken at ten years. If he had relations with her on the second day, he is stricken at twenty years; on the third day, he is stricken at thirty years; on the fourth day, he is stricken at forty years; on the fifth day, he is stricken at fifty years; on the sixth day, he is stricken at sixty years; on the seventh day, he is stricken at seventy years — corresponding to the seven days of her menstruation. And he does not depart from the world until he sees his fruits ruined. And the days of a man's life are but seventy years, for so David says, "The days of our years among them are seventy years" (Psalms 90:10). And if he merits, eighty, as it is said, "and if in strength, eighty years" (ibid.). Therefore, if a man had relations with the woman while she was a menstruant on the seventh day, the child is stricken at seventy years of age, so that he does not depart from the world until he sees his fruits ruined. As it were, these chastisements are not from Me; I have already testified against you and told you, "This shall be the law (torah) of the leper" (Leviticus 14:2).
Why Children Are Afflicted with Tzaraat in Tanchuma Metzora
Midrash Tanchuma Buber, Metzora 3:1
ד"א אל תתן את פיך. בלשון נקי דברה לך התורה, אם אמרה לך אשתך שהיא נדה, אל תחטיא את גופך ותיגע בה, אל תאמר לפני המלאך הממונה על צורת הולד שוגג הייתי ולא הייתי יודע, למה יקצף האלהים על קולך וחבל את מעשה ידיך, אלו הבנים שלוקים בנגעים. אמר ר' אחא אם שימש אדם את אשתו נדה, הבנים לוקין בצרעת, כיצד שימש ביום ראשון לנדתה, הבן נולד מהם לוקה לעשר שנה, שימש עמה ביום שני לוקה לעשרים שנה, ביום שלישי לוקה לשלשים שנה, ביום רביעי לוקה לארבעים שנה, ביום חמישי לוקה לחמשים שנה, ביום ששי לוקה לששים שנה, ביום שביעי לוקה לשבעים שנה כנגד שבעת ימי נדתה. ואינו יוצא מן העולם לעד שרואה פירותיו מקולקלין, ואין ימי חייו של אדם אלא שבעים שנה, שכן דוד הוא אומר ימי שנותינו בהם שבעים שנה וגו' (תהלים צ י), ואם זכה שמונים, שנאמר ואם בגבורות שמונים שנה (שם), לכך אם שימש אדם עם האשה נשדה בשביעי, הולד לוקה בן שבעים שנה, שלא יצא מן העולם עד שרואה פירותיו מקולקלין, כביכול אין המרדות הללו משלי, כבר העדתי בך ואמרתי לך זאת תהיה תורת המצורע.