I've always been sheepish about autographs and approaching the greats when that opportunity presents, but my method is basically this:
If it looks like I wouldn't be bothering them, approach them call them "Mr. Carter" or whoever and say "thank you for the music" or something more specific like "I just wanted to thank you for the music and tell you that _____________ recording was really important to me". Most of the time, they're gracious, but you get a read for a nod and a handshake vs turning and smiling and asking me a question that opens more conversation.
The all time best response I ever got was from George Cables. We were both in the wings between shows a the Port Townsend Jazz Festival one year and was standing by himself. I did the "Mr. Cables, I just wanted to thank you for the music" thing. I got a warm enough response that I pushed forward a little bit with my favorite secondary approach; ask them something specific about a recording session or tour that they were and see if I can learn something about how people worked and how the music got made.
I was ready with "You made a record with Dexter Gordon called Manhattan Symphonie and I'm curious how the arrangement on Body and Soul came together. Did he bring it in written out or was it something you worked out in the studio?"
Sometimes I get a short dismissive answer and often they either say that don't remember exactly or they're kind of general. In this case, he walked me over to a piano and showed me how he played it and then said " 'trane did something similar that I think Dex based it on, but 'trane did it this way..." Amazingly generous and absolutely stunning piano player.