Vajrasattva is the primordial buddha of diamond or rainbow light . His meditation is very beneficial for the confession and purification of bad karma. The most appropriate time to practice this meditation is at night, before going to sleep. Vajrasattva practice is also powerful in clearing socery and misfortunate happenings intended by supernatural.
I myself have ever had sleepless nights and sometimes felt prescence of darkness around me. I thus woke up and chanted the 100syllabus vajrasattva mantra three times, and after that felt calm and slept throughout the night. Somehow, it had benefited me in some ways.
Vajrasattva 100 Syllable Mantra :
OM VAJRASATTVA SAMAYA MANUPALAYA VAJRASATTVA
TENOPA TISHTHA DRIDHO ME BHAVA SUTOSHYO ME
BHAVA SUPOSHYO ME BHAVA ANURAKTO ME BHAVA SARVA
SIDDHI ME PRAYACCHA SARVA KARMA SUCH ME CITTAM
SHREYANG KURU HUM HA HA HA HA HOH BHAGAVAN
SARVA TATHAGATA VAJRA MA ME MUNCA VAJRI BHAVA
MAHA SAMAYASATTVA AH
Vajrasattva Heart Mantra :
Om Vajrasattva Hum