Purana Jyotisha Sangraha · by Vyasa
Chapter 8 · Dreams and Eclipse Rules
ब्रह्मवैवर्तपुराणम् : शुभाशुभस्वप्नाः ग्रहणनियमाश्च
सहस्रधा जपेद्यो हि भक्त्यैनं मधुसूदनम् ।निष्पापो हि भवेत्सोऽपि दुःस्वप्नः सुखवान् भवेत् ॥ ४३ ॥
From the Brahmavaivarta Purana, print Krishna-janma Khanda ch 82, verse 43.
A man who repeats this name of Madhusudana a thousand times with devotion becomes sinless. His bad dream turns happy.
Simple meaning: Repeating Madhusudana's name a thousand times is said to turn a bad dream happy.
Classical view, not medical advice.
अच्युतं केशवं विष्णुं हरिं सत्यं जनार्दनम् ।
The text gives eight holy names of Vishnu.
शुचिः पूर्वमुखः प्राज्ञो दशकृत्वश्च यो जपेत् ।
Repeating the eight names ten times, facing east, is said to turn a bad dream good.
विष्णुं नारायणं कृष्णं माधवं मधुसूदनम् ।
The text gives ten holy names of Vishnu.