The 28-year-old, whose previous deal expired in the summer of 2018, has made 26 appearances for the club this season.
"To get it over the line and guarantee myself coming here for the next couple of years is really good," he said.
Clayton was named player of the season last campaign by the club's official supporters' club.
Midfielder Adam Clayton has signed a contract extension to commit to Middlesbrough until 2021.