"Thomas wrote the Oratio ['Adoro te devote' (actually 'Te devote laudo')] in 1264, and until [his death in] 1274 prayed [it] during the second Mass [at which he was almost daily present [as a non-celebrant]. The prayer upon which he had come to rely came [therefore] spontaneously from his tongue when presented with the Viaticum [(beim Erblicken des Viatikums)], as, in March of 1274 in Fossanova, he arrived at his home-going [(sich . . . auf seinen Heimgang einstellte)].
Robert Wielockx, in "Adoro te deuote: zur Lösung einer alten Crux," Annales theologici: revista internazionale di teologia 21 (2007): 123 (101-138).
According to Wielockx, there would have been time for (so Thomas would have prayed) the Adoro te devote (Te devote laudo) between the Transubstantiation and the Tu rex gloriae, Christe (121 ff.). (Silently, of course.)
The Te deuote laudo was from a short time after Thomas' death in 1274 until 2007 and beyond mistakenly called the Adoro te deuote. From the abstract-in-English rather than my own notes on the body of the article: "the [Te deuote laudo] was mistakenly considered an elevation prayer and, as . . . often happened also later on, was transmitted in a Liber precum [(Book of prayers)] among other prayers of this kind. As early as the beginning of the 13th century these elevation prayers began regularly with the formula Adoro te under the influence of the popular incipit of the prayers for the adoration of the Holy Cross which, already in [t]he Carolingian age, were universally spread" (138), and this was the mechanism by which the substitution was effected.
Note that though there was (if memory serves) a tradition of his Adoration of the Cross as well, the painting by Sasseta (above) could also be taken as illustrative of the confusion that, according to Wielockx, resulted in the "old Crux"-creating and for that reason unworkable substitution of the incipit Adoro te devote for the incipit Te deuote laudo (which is what, in all probability, the incipit Thomas actually wrote).
Cf. this post here, which I worked up in a so-far-abortive attempt to verify in the early sources the claim (made by Pope Pius XI–in Studiorum ducem 6 (29 June 1923)–among many others) that Thomas was in the habit of "lean[ing] his head in the fervor of his unaffected piety against the Tabernacle containing the august Sacrament". Jean-Pierre Torrell, in vol. 2 (?) of his Saint Thomas Aquinas (or maybe it was via a consultation of Torrell communicated by Fr. Bernard Blankenhorn?), makes it clear that the claim for the Tabernacle must be an anachronism, given what we know about the rise of Tabernacle-based reservation.