Sho Sasaki's header was turned into his own goal by Bryan Oviedo after 16 minutes before second-half goals from Takumi Minamino and substitute Junya Ito settled a one-sided friendly in Osaka.
Japan's first outing since their surprise run to the last 16 of this summer's World Cup under Akira Nishino had been scheduled to take place against Chile in Sapporo last Friday.
However, that game was cancelled after an earthquake struck the northern Japanese island of Hokkaido a day earlier, leaving at least 40 people dead.
Minamino went close near the end of the first half with a fierce volley that brought a brilliant save from Costa Rica goalkeeper Leonel Moreira.
But after a Ritsu Doan lob was cleared off the line by Luis Hernandez, Minamino scored his first Japan goal with a swivel and clinical finish in the 66th minute.
Ito capped an impressive Japan performance by smashing home a left-foot shot deep into stoppage time.