The 25-year-old has only recently got back into manager Steve Bruce's first-team plans following a bust-up over his attitude.
But the former West Ham defender paid tribute to his manager for keeping faith in him and allowing him to play.
"I have repaid him with performances on the pitch and hopefully that will continue," Ferdinand said.
"I don't know how close I was to leaving. The manager has been good to me and all I can do is thank him for his maturity.
"A lot of managers would not have given me a second chance, so I have a lot of respect for him for that. I need to keep repaying him on the pitch, which is how he would want me to repay him."