Short answer
Cockroaches are an integral part of the food chain.
Background
Cockroaches are an important source of food for a number of organisms, such as arthropods, birds, and mammals. As such, they are an important part of the food chain. Cockroaches also play an important role in nutrient recycling. Most species of cockroach are detritus feeders and with the help of endogenous cellulases play an important role in degrading plant material. Some species, such as Cryptocercus, feed directly on wood and play a major role in lignocellulose digestion in temperate forests.
Reference
Reference