The 27-year-old, who scored two goals during Japan's unsuccessful FIFA Confederations Cup campaign in Brazil, started only three of his 25 league games for Stuttgart last season and has signed a deal with Mainz until 2016.
"He is a skillful player who will be very important for the style of football we play," said Mainz coach Thomas Tuchel of Okazaki, who has made 66 appearances for Japan.
"He is very mindful of the team, is very flexible going forward, and is always dangerous in front of goal."
Okazaki's arrival paves the way for Hungary forward Adam Szalai to join Schalke, after Mainz manager Christian Heidel confirmed on Monday that they have rejected the first concrete offer from Die Königsblauen
Tuchel has nevertheless said he expects the deal "to go through soon".