Bugs, such as cockroaches, seem to always die on their backs, at least in our homes. It turns out that bugs sometimes naturally get flipped over and, if dying, will be too weak to right themselves or are, otherwise, on a flat surface with no natural debris around that can be used to help.
They also might be suffering muscle spasms from the effects of poison, which might involuntarily cause them to flip themselves over. At this point they might not have the muscle control required to do anything about it (other than to think back over a life lived to the brim with much scurrying and dreams, in eternal avoidance of that big shoe in the sky).