The Shulchan Aruch · Orach Chayim
אורח חיים מ״דOrach Chayim 44
Siman 44 of 697 in Orach Chayim — 1 se'if
הלכות תפיליןLaws of Tefillin· siman 44
Se’if 1א׳
כָּל זְמַן שֶׁתְּפִלִּין בְּרֹאשׁוֹ אוֹ בִּזְרוֹעוֹ, אָסוּר לִישַׁן בָּהֶם אֲפִלּוּ שְׁנַת עֲרַאי, אֶלָּא אִם הֵנִיחַ עָלֶיהָ סוּדַר וְלֹא הָיְתָה עִמּוֹ אִשָּׁה, יָשֵׁן בָּהֶם שְׁנַת עֲרַאי, וְכֵיצַד הוּא עוֹשֶׂה, מֵנִיחַ רֹאשׁוֹ בֵּין בִּרְכָּיו וְהוּא יוֹשֵׁב וְיָשֵׁן. הָיוּ תְּפִלִּין כְּרוּכִין בְּיָדוֹ מֻתָּר לִישַׁן בָּהֶם אֲפִלּוּ שְׁנַת קֶבַע, וְאִם אוֹחֲזָן בְּיָדוֹ וְאֵינָם כְּרוּכִים בְּיָדוֹ אָסוּר לִישַׁן בָּהֶם אֲפִלּוּ שְׁנַת עֲרַאי: הַגָּה: וְדַוְקָא כְּשֶׁאוֹחֲזָן בְּלֹא נַרְתְּקָן, אֲבָל בְּנַרְתְּקָן בְּכָל עִנְיָן שָׁרֵי (בֵּית יוֹסֵף בְּשֵׁם הָעִטּוּר):
One may not even nap while wearing his shel rosh and shel yad. If he covers them with a kerchief and he is not with his wife he is permitted to nap. This means he should rest his head between his knees and he may nap while sitting in that position. If one binds his tefillin to his hand he may even sleep but if they are not bound to his hands he may not even nap. Rama: This restriction applies when he is holding them outside of their case but if they are in their case it is permitted.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0