Great question. The first thing to recognize here is that there were actually two regions that Sparta controlled in the Classical Period: Laconia and Messenia. The former was the region of Sparta, the latter a region conquered by Sparta through a series of wars that concluded in the 7th century BCE. Both regions had helots, but the exact balance and composition of the groups is exceedingly difficult. On the one hand, we have slight evidence from Plato that the Messenian helots had a tendency to revolt from Sparta because they were too homogenous—that is, too many people who all spoke the same language (Laws 777c). On the other hand, other sources refer to helots as helots, and refer to all rebel helots as "Messenian," irrespective of where they were from (e.g. Hdt. 9.64.2; Xen. Hell. 6.5.33). This suggests that opposition to Sparta was a central component to Messenian identity, perhaps even more so than descent and kinship that underpinned the communal identity of other Greek cities. Only in later authors like Diodorus (writing in the first century BCE) and Plutarch (late first century CE) appear to distinguish between Messenian helots from the Laconian helots as a general rule.
Now, you might be asking what this has to do with the end of helotage. Well, just as there are two regions, there are two turning points that we can point to.
The first is the so-called liberation of Messenia in the early fourth century BCE. Thebes, particularly under the leadership of Epaminondas, shattered Spartan hegemony of Greece through a series of victories, most famously at the battle of Leuctra in 371. These victories allowed Epaminondas to launch an invasion of Laconia itself in 369. Xenophon records the shock of the Spartan women at seeing the smoke and notes that the Spartans offered freedom (not citizenship) to any helot who would take up arms to fight *for* Sparta, which was a common recourse in times of crisis (Hell. 6.5.28). Some 6,000 signed up, but note that this did not end the system. However, though Xenophon never mentions it, Epaminondas established the city of Messene independent of Sparta, which meant an end of Messenian helotage (Pausanias 4.26.5–27.9).
Laconian helotage lived on, but seems to have both diminished and evolved through the third century, likely balanced against the diminishing numbers of Spartan citizens. Increasingly, helots paid a fixed percentage or amount of their production (Plut. Lycurgus 8.4 says fixed amounts, Pausanias 4.14.5 says half) to the landowner, probably in a relationship akin to sharecropping in the American south after the Civil War. The third century kings Agis IV and Cleomenes III proposed and executed a constitutional reform that intended to bring Sparta back to the ideals of Lycurgus with state-ownership of land, communal mess halls, and the agoge. As part of this reform, he allowed helots to gain their freedom in return for a 5 mna manumission fee—some 6,000 are said to have done so, and 2,000 of those he enlisted into his army (Plut. Cleomenes 23.1).
About two decades later, a Spartan "king" (he's usually considered a tyrant) named Nabis was said to have taken the next step of freeing helots, enfranchising them, and *gasp* forcing the wives and daughters of their former masters (Polybius 13.6, said more explicitly at 16.13), but by this point Polybius only refers to the enslaved people he frees as douloi and does not mention helots at all. (Although a treaty between Nabis and Rome in 194 allowed the women and children to return to their husbands, none of them seem to have done so (Livy 34.35.7)).
Nabis was assassinated in 192 while training his soldiers by Aetolians who he had called for support against the Achaean league (Livy 35.35). The Achaean general Philipoemen was supposed to have restored the exiled citizens and re-enslaved Nabis' enfranchised followers, but remains whether this marked the end of the helot system. The geographer Strabo (1st century BCE–early 1st century CE) would say no, since he declares that the system "held together as far as until the dominance of the Romans" (8.5.4). What he means by this description is unclear at best—the time of Augustus? the establishment of the province of Achaea?—but does suggest that the system had basically wrapped up before he wrote. However, while the Spartans may have continued to call their slaves "helots" and some form of sharecropping arrangement might have continued to exist, I am inclined to agree with the historian L.J. Piper in the article "Spartan Helots in the Hellenistic Age, (Ancient Society 1984–1986) that at least by the time of Nabis with the prospect of enfranchised former enslaved people and quite possibly even through the reforms of Cleomenes, the last vestiges of the helot system that we associate with Archaic and Classical Sparta had functionally expired. Slavery still existed, but the state-level oversight and ownership didn't.