Local guards took turns to stay in the tolbooth with the suspects. If the women fell asleep it was the job of the guards to march the women up and down the prison to keep them from sleeping. This process continued until they made a confession. After a number of nights without rest people would do anything to be allowed to sleep. It can also cause hallucinations.
Light deprivation can have much the same effect.
Although it was winter the women were not allowed a candle to see by or a fire to warm themselves. If they had access to a naked flame the witch hunters believed that they would use their magical powers to summon the devil to set them free. Once a confession was obtained a trial could be held. Trials were swift, perfunctory affairs with a guilty verdict almost inevitable. The convicted witch was lucky if she was merely banished such as Helen Alexander and Janet Bertie.