I think there are probably a few mathematicians that have deal with this problem better than the ones that have been simultaneously active in a completely different area, and from the ones that I know, I would suggest you to read Gian-Carlo Rota.
In particular, I would suggest you the book Indiscrete Thoughts, and chapter 9 ( The reductionist concept of the mind) from his essay The Pernicious Influence of Mathematics upon Philosophy.
In this chapter he asks: What does a mathematician do when trying to work on a mathematical problem? He starts citing Polya and saying that the most important step is look at other attemps, then he tells about mathematicians looking for the story of problems in order to solve them...A real story or an ideal reconstructed story a gifted mathematician may create.
He explains that the real nature of a mathematical problem is something that mathematicians are daily discovering (not something fixed or completely known) by a ''hand-in-hand'' passing of solutions of mathematical problems, and he associated this to an historic process.
He compares the way the mathematical thinking differ from the philosophers: hard thinking and blank mind is not the way how a mathematician thinks.
He concludes saying that ''the process of the working of the mind, which may be of interest to physicians but is of no interest to mathematicians, is confused with the progress of thought that is required in the solution of any problem''.
I would also suggest you to try to extract your own conclusions from the bibliographies, quotes and behaviour of your favourite mathematicians. You may start with the list of Alex Bellos: Pythagoras, Hypatia, Cardano, Euler, Gauss, Cantor, Erdős, Conway, Perelman and Tao.
If you are thinking about about advanced texts similar to Polya's 'How to solve it?', I would suggest you Solving Mathematical Problems by Terence Tao and his article https://terrytao.wordpress.com/career-advice/solving-mathematical-problems/.
If you are looking to read divulgation books related to the psychology of mathematical research, I would also suggest you: Fermat's Last Theorem: The Story Of A Riddle That Confounded The World's Greatest Minds For 358 Years by Simon Singh, Birth of a Theorem: A Mathematical Adventure by Cédric Villani, and to look at books/articles by Alex Bellos.
Finally, some well known quotes from famous mathematicians that are related to the psychology of mathematical research:
Roger Penrose mathematical thinking:
"My own way of thinking is to ponder long and, I hope, deeply on problems and for a long time ... and I never really let them go."
Andrew Wiles explanation of how is his experience working in mathematics.
“Perhaps I could best describe my experience of doing mathematics in terms of entering a dark mansion. You go into the first room and it's dark, completely dark. You stumble around, bumping into the furniture. Gradually, you learn where each piece of furniture is. And finally, after six months or so, you find the light switch and turn it on. Suddenly, it's all illuminated and you can see exactly where you were. Then you enter the next dark room...”
“I carried this problem around in my head basically the whole time. I would wake up with it first thing in the morning, I would be thinking about it all day, and I would be thinking about it when I went to sleep. Without distraction I would have the same thing going round and round in my mind.”
Alan Turing thought about what is mathematical reasoning, and how intense it is.
“Mathematical reasoning may be regarded rather schematically as the exercise of a combination of two facilities, which we may call intuition and ingenuity.”
“I have such a stressful job that the only way I can get it out of my mind is by running hard.”
John Horton Conway comparison of doing maths with playing games.
You get surreal numbers by playing games. I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math.
And the last quote, the beautifulness of the number by Paul Erdos:
Why are numbers beautiful? It’s like asking why is Beethoven’s Ninth Symphony beautiful. If you don’t see why, someone can’t tell you. I know numbers are beautiful. If they aren’t beautiful, nothing is.
That serves as a motivation to ''The experience of mathematical beauty and its neural correlates'' Front. Hum. Neurosci., 13 February 2014, a study that relates mathematical beauty to artistic beauty, as producing stimulations in the same part of the emotional brain.