Purana Jyotisha Sangraha · by Vyasa
Chapter 8 · Dreams and Eclipse Rules
ब्रह्मवैवर्तपुराणम् : शुभाशुभस्वप्नाः ग्रहणनियमाश्च
ओं क्रीं श्रीं क्लीं पूर्वं दुर्गतिनाशिन्यै महामायायै स्वाहा ।कल्पवृक्षो हि लोकानां मन्त्रः सप्तदशाक्षरः ।शुचिश्च दशधा जप्त्वा दुःस्वप्नः सुखवान् भवेत् ॥ ५२ ॥
From the Brahmavaivarta Purana, print Krishna-janma Khanda ch 82, verse 52.
Om Krim Shrim Klim, then 'to Durgatinashini Mahamaya, svaha': this seventeen-syllable chant is a wish-tree for the worlds. Pure, repeating it ten times turns a bad dream happy.
Simple meaning: A seventeen-syllable chant to Durga is said to turn a bad dream happy.
Classical view, not medical advice.
शतलक्षजपेनैव मन्त्रसिद्धिर्भवेन्नृणाम् ।
Repeating the chant ten million times is said to bring mastery and every wished success.
ओं नमो मृत्युञ्जयायेति स्वाहान्तं लक्षधा जपेत् ।
Repeating the Mrityunjaya chant a lakh times after a death dream is said to bring a hundred years of life.
काश्यपे दुर्गते नीचे देवब्राह्मणनिन्दके ।
The dream should not be told to certain people, including fools and those who blame gods.