The Basque born player made over 200 appearances for La Real and was widely regarded as one of their best players.
"I am happy, I thought that my time at La Real was over and I needed a change," he told the Bilbao side's official media.
"I was not completely happy there and in the end I had to make a decision that is very important to my life."
Martinez touched on his early experiences in football, growing up in the Basque Country where many supported Athletic.
"I was very young and a child from a village has a hard time leaving," he continued.
"You are a bit lost but when I arrived I felt very comfortable, like at home, but now I am back and very happy."