The Norway international failed to force his way into the Real line-up, making just two appearances for the first team since joining the Spanish giants in January 2015 from home club Stromsgodset.
The 18-year-old said he was looking forward to getting more playing time for the Dutch club.
"This is an opportunity to show what I can do. I'm very excited," he said.
"The most important thing is my development and that is why I'm here. Real Madrid is the best club in the world but they have the best players there and that is why I decided to come here," he added.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
Odegaard is under contract with Real until June 2021.
Heerenveen are fourth in the Eredivisie, with 29 points from 19 matches.
(Reporting by Adriana Garcia; Editing by Keith Weir)
