Steve,
My unqualified input:
A lot of these conditions are very much in the head, which I guess is why hypnosis is so often helpful. (Think fear of flying, fear of public speaking, fear of water, fear of spiders etc..)
I suspect that because your mind was in a happy place whilst flying, it forgot all about its' fear of open spaces.
I've taken plenty of people sailing who were at first quite anxious and fearful, but with careful management they were eventually able to thoroughly enjoy it.
More recently I've done the same with taking people flying, although I'm more cautious about that as I'm not as experienced at flying as I am with sailing and so am wary of handling nervous passengers correctly when under stress.
It sounds like your instructor, conciously or not, was able to put you in a frame of mind that enabled you to relax and enjoy yourself.
I think it would help you generally if you could recall that happy relaxed euphoric feeling when stressed and it might help you reduce the symptoms.
just my tuppeny-worth you understand.