It is not good to rely upon the spiritual experiences of others. This creates dependency, weakness, and ignorance. To quote Deeprak Chopra: "Religion is belief in someone else's experience. Spirituality is having your own experience."
Since you were masturbating at that time, I would not rely on such an experience as objective. Even if we are transmuting our energies every day through pranayama or alchemy, we still cannot trust our perceptions, let alone if one is fornicating!
Regarding many imams in this day and age, most of them are black magicians. Any imam who ejaculates their semen is a black magician, whether they are awakened in evil or not. To find the real Sufi and Muslim initiates in this physical world is excruciatingly difficult, but they can be contacted easily within the internal planes under the guidance of Allah, the Cosmic Christ.
However, numerous black tantric Sufis are spreading their degeneration in the Middle East under the tenebrous auspices of Moloch. Therefore, we must always guard ourselves from imposters of the light of our Prophet Muhammad (peace and blessings be upon him) by studying Al-Qur'an and the Sunnah in accordance with the unveiled teachings of alchemy as given by the Venerable Master Samael Aun Weor.
The guru [imam] who has not received the reed is not a true guru. Every initiate that raises the serpent upon the staff receives the reed.
This is how the city and the gates thereof and the wall thereof must be measured with the reed. The Jerusalem of every human being must be measured with the reed.
Therefore, the Master [imam] that still has not awakened the Kundalini [through white tantra, chaste sexual magic] is a false prophet. -Samael Aun Weor, The Aquarian Message: The New Jerusalem
O People of the Book! Certainly Our Apostle has come to you, clarifying for you much of what you used to hide of the Book, and excusing many [an offense of yours]. Certainly there has come to you a light from Allah (mina llāhi nūrun, minah indicating sex in Arabic and Hebrew, born from nūrun, the light [aur] of nun, the sperm and ovam transmuted in Allah-Chemia, Alchemy), and a manifest Book (to those with Kabbalistic understanding). -Al-Māʾidah, 5:15