The La Liga side confirmed the appointment of the Scottish boss earlier on Monday after his calamitous spell at Old Trafford, which ended in his dismissal just 10 months into a six-year contract.
Mata has thanked Moyes for signing him from Chelsea, where he rarely featured in the starting line-up, and claimed the Scot will rebuild his reputation after having "no luck" at Old Trafford.
"I was with him just a few months but of course I will always be grateful to him because he played a key role in my move to United. He was the one who called me, who received me and who gave me the confidence to come here," Mata told Spanish radio station Cadena Cope.
"He is a coach who had no luck here [at Old Trafford]. Obviously, replacing Sir Alex Ferguson is not easy. Not for him not for anyone. He was unlucky. He did not got the results we wanted and his spell ended sooner than expected."
Mata believes that his former manager has what it takes to flourish in Spain, and proved his credentials during 11 sucessful seasons at Everton.
"My experience with him is very good. He did a very good job at Everton. He works hard and prepares really well for the games.
"I wish him the best at Real Sociedad. I have great friends like [former QPR and Real Madrid midfielder] Esteban Granero there and I also want the best for him. I hope he does well.
"Real Sociedad is a club with lots of history and a great stadium and San Sebastian is a place where you can live really well. They have a great team, especially good attacking players and hopefully will do great. I think he can settle well and can get things right."