Hisahito, who began attending the school this month, was not in the classroom when the knives are believed to have been left.
There were no reports of any injuries or damage at the school, while police did not find any threatening note related to the case.
Security camera footage showed a man with a helmet trespassing on the school grounds at around noon, they said.
Police had been searching for the middle-aged man who was dressed as a construction worker.
Threats to the imperial family are relatively rare. In 1975, Akihito was almost hit by a Molotov cocktail in Okinawa, a major World War II battlefield where there was strong anti-emperor sentiment.