סימן י סעיף כג
תְּפִלִּין צְרִיכִין גּוּף נָקִי. וּצְרִיכִין לִזָּהֵר שֶׁלֹּא לְהָפִיחַ בָּהֶם (וְעַיֵּן לעֵיל סִימָן יב ס"ד). חוֹלֶה מֵעַיִם אֲפִלּוּ אֵין לוֹ צַעַר, פָּטוּר מִן הַתְּפִלִּין, מִפְּנֵי שֶׁאֵינוֹ יָכוֹל לִשְׁמֹר אֶת עַצְמוֹ בִּנְקִיּוּת כָּרָאוּי. וְאִם נִרְאֶה לוֹ שֶׁיָּכוֹל לִהְיוֹת בְּגוּף נָקִי בִּשְׁעַת קְרִיאַת שְׁמַע וּתְפִלַּת שְׁמוֹנֶה עֶשְׂרֵה, יָנִיחֵם אָז. אֲבָל שְׁאָר חוֹלֶה, אִם מִצְטַעֵר בְּחָלְיוֹ וְאֵין דַּעְתּוֹ מְיֻשֶׁבֶת עָלָיו מִפְּנֵי צַעְרוֹ, פָּטוּר, מִפְּנֵי שֶׁאָסוּר לְהַסִּיחַ דַּעְתּוֹ מֵהֶן. וְאִם לָאו, חַיָּב (סִימָן לח).
He who wears tefillin must have a clean body, and must be careful not to flatulate while wearing them. A person suffering from diarrhea, although he has no actual pain, is exempt from the mitzvah of tefillin, because he is incapable of keeping himself properly clean. If he feels that he will be able to keep his body clean when reading the Shema and during the Shemoneh Esrei, he may then put on tefillin. Regarding any other sick person, if he suffers pain from his sickness, and his mind is not at ease because of his pain, he is exempt from the mitzvah42Nevertheless, one who wishes to be stringent, is permitted to put them on. because it is forbidden to divert his attention from the tefillin; but if he is not in pain he must put them on.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)