I was told years ago by my brother-in-law, who was an accomplished and world acclaimed jazz musician living in Studio City, CA he said the term originated with African American jazz musicians of the 1920-30 s era.
Musicians had several musical avenues to generate income to feed their families, club date, musical backup for singers cutting records, jingles (commercials), etc. When there was no work available for the, Black musicians took on work in movies as extras. At the time there was just not much work for African Americans in general, but there was a big demand for the popular Tarzan films. Many of the Black artist took on the roll of tribesmen to keep food on their tables. When musical work was available, the artist would accept it and kidding would exclaim, "just picked up a music gig, time to get that monkey off my back"
That s how I heard it while living in 1960 s LA, so not a term to demean anyone just a point of levity.