Mechanical-energy harvesters based on coiled carbon nanotube yarns are promising materials for sustainable energy generation. In this work, we present a novel mechanism to harvest energy from mechanical fluctuations by using coiled carbon nanotube yarns coated with polyelectrolyte gel. We developed a theory to explain how this new kind of energy harvesting is possible. The gel fills up all space between the coils and expands when the yarn is stretched. This translates into a change in electrical double-layer configuration, hence into a change in electrical potential. This makes it possible to electrochemically convert tensile or torsional mechanical energy into electrical energy. The influence of the yarn surface charge, polyelectrolyte charge density and salt concentration is analyzed, giving directions for optimum process design. We show calculation results for the generated power of a system consisting of two yarns coated with positive and negative polyelectrolyte gel.