Canto 1 - Boyhood
Bāla-kāṇḍa
Chapter 62: Śunaḥśepa Saved
Text 1.62.6

राजा च कृतकार्यः स्यादहं दीर्घायुरव्ययः।
स्वर्गलोकमुपाश्नीयां तपस्तप्त्वा ह्यनुत्तमम्॥

rājā ca kṛta-kāryaḥ syād ahaṁ dīrghāyur avyayaḥ
svarga-lokam
upāśnīyāṁ tapas taptvā hy anuttamam

rājā ca kṛta-kāryaḥ syāt = [please do that by which] the king would be successful in his endeavors; aham = I; dīrgha-āyuḥ = and with a long life; avyayaḥ = and without being sacrificed; svarga-lokam = Svargaloka; upāśnīyām = would attain; tapaḥ taptvā = by performing austerities; hi anuttamam = excellent.

Please do that by which the king would be successful in his endeavors, and without being sacrificed and with a long life, I would attain Svargaloka by performing excellent austerities.1

NOTE. Śrīla Prabhupāda notes that the heavenly planets are in the mode of goodness: “There is an upper planetary system, consisting of the heavenly planets, where everyone is highly elevated. According to the degree of development of the mode of goodness, the living entity can be transferred to various planets in this system.” (Bhagavad-gītā 14.18 purport)

Therefore, it is understandable that Śunaḥśepa wants to perform excellent austerities to become sufficiently sāttvika to attain Svargaloka.

1 Śunaḥśepa’s request was fully in line with Vedic dharma.