Ben Shattuck investigates various theories, including that the girls ate hallucinogens:

The take-home from the trials shouldn’t be that poisonous plants can make you hallucinate, but that a perfectly capable, religious, and law-abiding community that laid the roots for American justice legally and conscientiously executed 20 of its own innocent citizens; that over 150 people in Salem that year who were charged as having consorted with the Devil. In [the jimsonweed] theory, the girls went crazy. In [historian Mary Beth Norton]’s, the town went crazy.