Tanya Chapter 41
The intent of Lishma is required prior to beginning the learning:
It is known that for a Beinoni, the main preparation of Torah study Lishma [which can invalidate the ability of one’s learning to be elevated above], is prior to one commencing his Torah session. This is derived from the law regarding a Get [i.e. bill of divorce] and Torah scroll, which must be written Lishma otherwise the Get/scroll is invalid, and the law is that it suffices to state at the commencement of the writing of the Torah scroll that he is writing it for the sake of the Kedusha of a Sefer Torah. Likewise, before commencing the writing of a Get it suffices to state that he is writing it for his and her sake [i.e. the husband and wife]. [We will now discuss what to do if one is learning Torah for many hours consecutively, and if one should stop intermittently in order to reinforce his Lishma intents.]
Stopping to reinforce one’s Lishma intents every hour one’s learning:
One who is learning Torah for many consecutive hours is to stop and contemplate the above matter of Mesirus Nefesh every hour, at the very least. The reason for the hourly intervals is because every hour there is a new Divine flow from the upper worlds to enliven the lower worlds, while the Divine flow from the previous hour returns to its source. This is considered the mystical concept of Ratzo Veshuv, mentioned in Sefer Yetzira.
Each hour, the Torah study and Mitzvos of the previous hour is elevated:
As stated above, each hour there is a new Divine flow into the lower worlds while the previous Divine flow returns above. The previous Divine flow does not return above alone, but rather takes with it the Torah learning, and good deeds [i.e. Mitzvah fulfillment] of the entire previous hour, that was performed by those who dwell in the lower world.
The twelve combinations of the Divine name shine on an hourly shift:
A deeper understanding into the hourly changes of Divine flow can be understood through introducing the concept of the different combinations of Hashem’s name. The Divine name of “Yud Kei Vav Kei” and “Adniy” each have [24 possible combinations of letters, as four letters can be recombined in 24 different ways, of which] twelve [of these] combinations shine to the lower worlds. Every hour one of the 12 combinations of the Divine name shines. During the day, one of the 12 combinations of the name Yud Kei Vav Kei shine every hour, while at night, one of the 12 combinations of the name Adniy shine every hour.
The intent of the Mesirus Nefesh is solely to give G-d pleasure:
The intent of the surrender of one’s soul in Mesirus Nefesh to Hashem through one’s Torah learning and prayer, and elevation of the Divine sparks which are found in them to its source, is to be solely for the purpose of causing gratification to Hashem. The return of one’s soul and the Divine sparks to Hashem cause Him gratification similar to a King who rejoices over the return of his only son who was in captivity and imprisonment. This intent is completely sincere and true in every Jewish soul, at all times and at every hour due to the inner natural love which is an inheritance to us from our forefathers. Nonetheless, one [is not to suffice with this natural love and] must also set aside times to contemplate the greatness of Hashem, to achieve intellectual love and fear, and perhaps he will be successful in doing so.
 Footnote of Rebbe in lessons in Tanya