An inherent characteristic of biological vessels and tissues is that they exhibit significant compliance or flexibility, both in the normal and tangential directions. The latter in particular is atypical of standard engineering materials and presents additional challenges for designing robotic mechanisms for navigation inside biological vessels by crawling on the tissue. Several studies aimed at designing and building wormlike robots have been carried out, but little was done on analyzing the interactions between the robots and their flexible environment. In this study, we will analyze the interaction between earthworm robots and biological tissues where contact mechanics is the dominant factor. Specifically, the efficiency of locomotion of earthworm robots is derived as a function of the tangential flexibility, friction coefficients, number of cells in the robot, and external forces.