Dexter Gordon was nominated for a Best Actor Academy Award -- and won a
handful of other Best Actor awards -- for his role as a jazz sax player in 'Round Midnight (1986)(loosely based on sort of a combination of Bud Powell and Lester Young). A pretty amazing performance, and a pretty decent movie.
Hoagy Carmichael had a fairly prolific acting career. My favorite role was as Cricket, the laconic, wisecracking piano player in To Have and to Have Not (1944), in which he had at least one fun scene with Lauren Bacall.