I think in writing that's generally referred to as an "internal monologue" as you are the only speaking in your own mind. I haven't been able to find a singular word that means the same thing but I hope that helped!
"The love of learning, the sequestered nooks, and all the sweet serenity of books." -Henry Wadsworth Longfellow