Did I write the scale degrees above the notes of the tunes and transfer them to the new keys or did I simply imagined the scale degrees in my head?
On the sheet with the tunes in single voice notation that I had in front of me, I only had written the tonal plan (the names of the keys that I planned to use in the specific order) and the scale degrees of the starting pitches of each tune. I didn't need all the scale degrees to see in front of me.
How could you achieve something like that yourself? Well, it certainly takes a lot of practice and experience in harmonization and transposition. How much? I think the number will be different for every person. It will depend on the level of the organ playing techinique, sight-reading experience, skills in music theory etc.
If you would like to play similar improvisations around Christmas next year, I think you can begin your training right now. The practicing method is really simple - take your favorite hymnal and start transposing your hymns to different keys. You can choose both horizontal and vertical approach.
With the horizontal approach you would play many hymns but only one version of transposition (say, a major second up at first) and only after transposing many hymns this way go back to the beginning and transpose to a different key. How many? As many as it takes to transpose them fluently. With the vertical method, choose one hymn and transpose to every key and then go on to the next hymn.
Try either one of the above approaches and I'm sure your listeners will enjoy your improvisations with transpositions for the next Christmas season.