The existing answer suggests that Voldemort had Quirrel switch to Defense Against the Dark Arts so that he could be involved in protecting the stone. However, that does not seem like a viable answer considering the stone's timeline. Harry met Quirrel in the Leaky Cauldron and Quirrel told him that he teaches Defense Against the Dark Arts:
"What sort of magic do you teach, Professor Quirrell?"
"D-Defense Against the D-D-Dark Arts," muttered Professor Quirrell, as though he'd rather not think about it.
At that point the stone was still in Gringotts; indeed it was removed by Hagrid that very day:
Something really extraordinary had to be inside this top security vault, Harry was sure, and he leaned forward eagerly, expecting to see fabulous jewels at the very least – but at first he thought it was empty. Then he noticed a grubby little package wrapped up in brown paper lying on the floor. Hagrid picked it up and tucked it deep inside his coat. Harry longed to know what it was, but knew better than to ask.
Thus, Quirrel could not have become the Defense Against the Dark Arts teacher in order to gain access to the stone, because at the time that he became the Defense Against the Dark Arts teacher the position did not actually offer any greater access to the stone.
So what then is the answer to the question? Well, you specifically wrote:
Do books indicate in any way why he had this sudden change of heart?
Actually, the books don't indicate that he ever changed positions at all. In fact, as I argued in this answer, if anything the books indicate that he did not switch positions. The whole idea that he was originally the Muggle Studies teacher was simply stated by JK Rowling well after the fact, and has no basis in the books.
However, if you are determined to take Rowling's word that he was the Muggle Studies teacher originally, there is hardly a lack of reasons why he would switch. Perhaps he had always wanted to teach Defense Against the Dark Arts, and it had just become available. Perhaps Voldemort wanted him to be subjected to the jinx on the position because Voldemort wouldn't need Quirrel for more than a year – either he would have stolen the stone by then, or Quirrel is not competent enough. There could be many other possibilities as well, but it's not discussed in the books.