Purana Jyotisha Sangraha · by Vyasa
Chapter 8 · Dreams and Eclipse Rules
ब्रह्मवैवर्तपुराणम् : शुभाशुभस्वप्नाः ग्रहणनियमाश्च
रक्तचन्दनकाष्ठानि घृताक्तानि जुहोति यः ।गायत्र्याश्च सहस्रेण तेन शान्तिर्विधीयते ॥ ४२ ॥
From the Brahmavaivarta Purana, print Krishna-janma Khanda ch 82, verse 42.
A man offers pieces of red sandalwood smeared with ghee into the fire, with a thousand Gayatri chants. By this a shanti (peace ritual) is laid down.
Simple meaning: The text prescribes a fire offering of red sandalwood with a thousand Gayatri chants as the peace ritual.
Classical view, not medical advice.
सहस्रधा जपेद्यो हि भक्त्यैनं मधुसूदनम् ।
Repeating Madhusudana's name a thousand times is said to turn a bad dream happy.
अच्युतं केशवं विष्णुं हरिं सत्यं जनार्दनम् ।
The text gives eight holy names of Vishnu.
शुचिः पूर्वमुखः प्राज्ञो दशकृत्वश्च यो जपेत् ।
Repeating the eight names ten times, facing east, is said to turn a bad dream good.