Real took the lead in the 17th minute through Ronaldo, who rounded Everton goalkeeper Tim Howard and finished calmly.
However, Carlo Ancelotti's team doubled their advantage when Ronaldo squared for Ozil to sidefoot home.
Nikica Jelavic was introduced for the second half and within seven minutes of his introduction the Croatian flicked goalwards from a Kevin Mirallas cross-shot - but goalkeeper Diego Lopez saved.
Jelavic did pull a goal back with a snapshot just past the hour mark - but Everton were unable to find an equaliser.
Martinez's side start their Premier League campaign at Norwich on August 17.
- Sports & Recreation
- Cristiano Ronaldo
- Mesut Ozil
- Marouane Fellaini
- Sylvain Distin
- Carlo Ancelotti
- AC Milan