The Zohar says that the way to make G-d rest upon you is only through doing Mitzvot. Because even a righteous person is not completely nullified to G-d, rather he feels love for G-d. However through doing G-d's commandments, one can be nullified in front of G-D which is upon him. The reason for this is since the Mitzvot are G-d real will, and they are not something separate from him.
When we say that, G-d rests upon something it means that he reveals himself there and that thing is now nullified to him.
So, when one learns Torah, his G-dly soul and his speech and thoughts become one with G-d, However his physical body is not. However, through doing physical Mitzvot, one brings a revelation of G-dliness into his physical body, and also his body is nullified to G-d. Even though his body and his animalistic soul didn't become holy, still since they are forced to do G-d's will, because of the G-dly soul, and they are so to stay asleep. And therefore G-d can rest upon them too.