Dielectric elastomer-based crawling robots can utilize a voltage-induced deformation to achieve prescribed crawling movements. Although a rich repertoire of robots have been proposed with various design schemes, developing the logic and a unified methodology is hard. This work designs inchworm-inspired crawling robots based on computational optimization. An improved shape and topology optimization method is developed using a fat B-spline curve to generate a stable frame for the dielectric elastomer actuators (DEAs). An optimization framework is proposed, and the updating algorithm is assessed with a sensitivity analysis. The leg-DEA and abdomen-DEA of the crawling robot are modeled and designed automatically with iterations implemented in finite element simulation. An optimization soft crawling robot was fabricated and tested, which can move smoothly along the ground.