The Messenger of Allaah (peace be upon him) says: “Allah has not sent down a disease without sending down a remedy for it, so treat yourselves medically.” Thus, we have to look for remedy from the skilled doctors and every treatment whether physical or moral, that has no narration (evidence) for its prohibition in the ruling of Sharia, such treatment is permissible.
If electronic devices are used to cause hypnosis so to help a person sleep and be treated without feeling pains, just like anesthesia, there is nothing wrong with such treatment.
As for if hoaxes are used, such as those who summon the jinn (demon) and their apostate, and delude people with their magic to hypnotize their patients; what applies to such people is that we are prohibited from going to witches and to priests like them. This is because whoever goes to them, ask favor from them, and believe in them has disbelieved in what was revealed to Prophet Muhammad (peace be upon him.)
Therefore, let us learn from experts in the field who are trusted and skilled Muslim doctors.