I do not believe you hearing music in your head has that much to do with you being a musician. If your senses "go solo" (otherwise known as hallucination) or, less extreme, if you are thinking about music or imagery, it is, as far as I know, your brain/sensory system telling you it is bored. It is understimulated, and that is where it starts to invent its own stimuli or cling to its own imagined objects. Music is just a thing that can be focussed on, maybe even meditated on, but apparently in your daily activity your mind likes to keep several dishes in the air otherwise it becomes bored, demonstrating this to you with these earworms. If the mind is more skilfull in accepting lack of stimulation, that is to say, if you have managed to overcome the first hindrance, which is desire for sensual stimulation, I would expect the music will stop and the lights will go on in your mental pub.
So, I do not think it is very relevant to figure out the role of music in itself (music is just a stimulus, for better or for worse) or your previous activity as a mucisian, the way I see it, the issue is mental boredom.
I'm not a teacher so no solutions, this train of thought has reached its final destination. Maybe it does help a bit