At the beginning of The Crucible's final act, Sarah Good and Tituba occupy the jail. When they are being removed from the cell, they begin calling to the devil to take them home. It is unclear whether they are continuing their charade that they are witches in order to save themselves from execution, or whether they have really lost their minds and committed themselves to rejecting Christianity.
It is likely that Tituba is sane but pretending, because she has given the authorities all the names they wanted and followed their manipulations when they obviously were leading her testimony by suggesting the names of Good and Osburn. She is bright and understands that as the lowest ranking person in Salem society she is at the mercy of the zealots that she lives among.
Sarah Good, however, has been a character whose sanity has been questionable since the moment she entered the play. But at the same time, she has existed on the margins of Salem society as a beggar. It is entirely possible that she, too, keeps up the charade because she figured out a long time ago what it takes to survive in the unforgiving environment of a Puritan colony.