NEVER spray water or oil in the engine bay. Its not recommended by the manufacturers, and none of the 3s dealers would do it either.
water = rust
oil = more dust
If it is an extreme case you may spray pressurized water, but make sure to cover the ecu, abs actuator, fuse box, injectors, plugs. In case of cng the advancer/emulator have to be covered up as well.
there are many engine cleaning products available in the market, get hold of one.