Looking into the term earworms lead me to the following answer.
If you search earworms into Google Scholar, at the top of the list is 3 papers, after which the rest seem to be about corn earworms. The papers are Beaman & Williams (2010) followed by Halpern & Bartlett (2011) which is then followed by Williamson, et al. (2012).
It was the last paper which lead me to the term Involuntary Musical Imagery and the paper was in Psychology of Music which lead me to the field of Music Psychology
or the psychology of music, [which] may be regarded as a branch of both psychology and musicology. It aims to explain and understand musical behavior and experience, including the processes through which music is perceived, created, responded to, and incorporated into everyday life (Tan, et al.2010; Thompson, 2015).
Searching Google Scholar for Involuntary Musical Imagery leads you to much more.
References
Beaman, C. P., & Williams, T. I. (2010). Earworms (stuck song syndrome): Towards a natural history of intrusive thoughts. British Journal of Psychology, 101(4), 637-653. DOI: 10.1348/000712609X479636 PDF: http://centaur.reading.ac.uk/5755/1/earworms_write-upBJP.pdf
Halpern, A. R., & Bartlett, J. C. (2011). The persistence of musical memories: A descriptive study of earworms. Music Perception: An Interdisciplinary Journal, 28(4), 425-432. DOI: 10.1525/mp.2011.28.4.425 PDF: http://www.academia.edu/download/45162267/The_Persistence_of_Musical_Memories_A_De20160428-27955-1tiomp.pdf
Tan, S., Pfordresher, P., & Harré, R. (2010). Psychology of Music: From Sound to Significance. New York: Psychology Press.
Thompson, W. F. (2015) Music, Thought, and Feeling: Understanding the Psychology of Music, 2nd Edition. New York: Oxford University Press.
Williamson, V. J., Jilka, S. R., Fry, J., Finkel, S., Müllensiefen, D., & Stewart, L. (2012). How do “earworms” start? Classifying the everyday circumstances of Involuntary Musical Imagery. Psychology of Music, 40(3), 259-284. DOI: 10.1177/0305735611418553 PDF: http://www.doc.gold.ac.uk/~mas03dm/papers/Williamson_etal_Earworms_POM_2012.pdf