The 20-year-old winger will remain with the League Two outfit for a month, although Rovers have the option to extend the deal until January.
"Matthias is a player we've been watching for a while and I'm pleased to be able to bring him to Tranmere," said manager Rob Edwards.
"We've signed him on a youth loan so he can spend some time with us and hopefully we can help him develop and he can help us on the pitch.
"He'll add to our attacking options and is a player who likes to run at defenders and can score goals too. I'd like to thank Sam Allardyce and West Ham for allowing Matthias to join us on loan."
England youth international Fanimo has made three senior appearances for the Hammers.