The Egyptian Interior Ministry said in a statement on Saturday that the deadly blast took place on a farm in the province of Beni Suef, south of Cairo.
The statement added that the men were killed in an accidental explosion while preparing the bombs in the troubled region.
Police and law enforcement agencies have also found bomb-making materials at the site, it said.
Meanwhile, police sources say the suspected militants were members of the Muslim Brotherhood movement.
The military-backed Egyptian government has blacklisted the Brotherhood as a terrorist organization. It also launched a brutal crackdown on Brotherhood’s supporters, sentencing many of them to death.