The 23-year-old has been with Madrid since 2013, and made his first-team debut in October 2014.
The Spaniard has not featured for Los Blancos since, however, and spent last season on loan at Rayo Vallecano in the second tier.
De Tomas scored an impressive 24 goals in 32 Segunda Division appearances during the 2017-18 campaign, and will now return to the Bernabeu for the start of pre-season training.
Todos tenemos sueños...— Raul De Tomas (@RaulDeTomas9) June 17, 2018
El mío empezó a los ocho años cuando entré por primera vez en este club siendo un niño.
Sabía que cada paso que he dado hasta hoy me llevaría a alcanzar mi sueño: ser jugador del Real Madrid. Cinco años más en el club de mi vida..GRACIAS ,Hala Madrid . pic.twitter.com/QyzqierewJ
"We all have dreams. Mine started at the age of eight when I first entered this club as a child, knowing that every step I have taken to date would lead me to achieve my dream: to be a Real Madrid player," De Tomas tweeted. "More than the club of my life, thank you. Hala Madrid."
In April, De Tomas revealed that his "dream" was to represent the Madrid first team next season.