"The two men had descended into a septic tank of the restaurant at around 4 pm. They died almost immediately as they inhaled the methane gas collected in the tank," Additional Commissioner of Police (East) Seemanth Kumar Singh said.
The two victims were identified as Ramu, 25, and Ravi, 38, from Raichur, about 460 km north of Bengaluru.
"The fire brigade personnel had retrieved the bodies of the two men," Mr Singh said.
"The restaurant was built on the basement of the building and had violated the safety norms prescribed by the civic authorities. We are also questioning the civic health inspector in-charge of the region," Mr Singh added.