There are a lot of threads about where bacteria live which in actuallity is everywhere in the tank. The vast majority of them though are where the most food passes which is the filter. Since the water, which contains the ammonia and nitrite, is constantly passed through the filter, that is where most of the basteria colonize. There will be some on the surface of the gravel or sand but because there is little or no water flow below the surface of the substrate, nothing but anorobic bacteria will live below. There will also be bacteria on the tank walls, plants and decorations too but once again, since there isn't as much food passing by them, there won't be as much as in the filter.
Having said that, if you happen to use an under gravel filter, then you will have quite a bit of bacteria in the gravel as the water passes through the gravel going to the filter.