Soft robots and actuators are emerging devices providing more capabilities in the field of robotics. More flexibility and compliance attributing to soft functional materials used in the fabrication of these devices make them ideal for delivering delicate tasks in fragile environments, such as food and biomedical sectors. Yet, the intuitive nonlinearity of soft functional materials and their anisotropic actuation in compliant mechanisms constitute an existent challenge in improving their performance. Topology optimization (TO) along with four-dimensional (4D) printing is a powerful digital tool that can be used to obtain optimal internal architectures for the efficient performance of porous soft actuators. This paper employs TO analysis for achieving high bending deflection of a 3D printed polyelectrolyte actuator, which shows bending deformations in response to electrical stimuli in an electrolyte solution. The performance of the actuator is studied in terms of maximum bending and actuation rate compared with a solid, uniformly 3D printed and topology-optimized actuator. The experimental results proved the effectiveness of TO on achieving higher bending deformation and actuation rate against a uniformly 3D printed actuator.