From the booklet of Rabbi David Shalom Naki, shlit"a: a son who learns with his father, and the father often dozes, may at some opportunity show him the words of the Rambam, that one does not sleep in the beit midrash, and that whoever dozes, his Torah becomes torn pieces. If the dozing causes shame, the son should wake him gently.