Valmiki Ramayana Bala Kanda Sarga 45 Shloka 3
Original Shlokaतस्य सा शर्वरी सर्वा सह सौमित्रिणा तदा। जगाम चिन्तयानस्य विश्वामित्रकथां शुभाम् ।।1.45.3।।
1 source checked for this shloka
तदा then, तस्य Rama, सौमित्रिणा सह together with Lakshmana, शुभाम् holy, विश्वामित्रकथाम् the story narrated by Visvamitra, चिन्तयानस्य while thinking, सा that, सर्वा completely, शर्वरी night, जगाम passed away.
Then Rama along with Lakshmana spent the whole night reflecting on the auspicious story narrated by Viswamitra.