Arjuna was the medium for the Bhagvad Gita while his grandson Pariksit became the medium for Srimad Bhagvatam.
The Supreme Lord is so kind to His pure devotees that in proper time He calls such devotees up to Him and thus creates an auspicious circumstance for the devotee. Maharaja Pariksit was a pure devotee of the Lord, and there was no reason for him to become extremely fatigued, hungry and thirsty because a devotee of the Lord never becomes perturbed by such bodily demands. But by the desire of the Lord, even such a devotee can become apparently fatigued and thirsty just to create a situation favorable for his renunciation of worldly activities. One has to give up all attachment for worldly relations before one is able to go back to Godhead, and thus when a devotee is too much absorbed in worldly affairs, the Lord creates a situation to cause indifference. The Supreme Lord never forgets His pure devotee, even though he may be engaged in so-called worldly affairs. Sometimes He creates an awkward situation, and the devotee becomes obliged to renounce all worldly affairs. The devotee can understand by the signal of the Lord, but others take it to be unfavorable and frustrating. Maharaja Pariksit was to become the medium for the revelation of Srimad-Bhagavatam by Lord Sri Krishna, as his grandfather Arjuna was the medium for the Bhagavad-gita. Had Arjuna not been taken up with an illusion of family affection by the will of the Lord, the Bhagavad-gita would not have been spoken by the Lord Himself for the good of all concerned. Similarly, had Maharaja Pariksit not been fatigued, hungry and thirsty at this time, Srimad-Bhagavatam would not have been spoken by Srila Sukadeva Gosvami, the prime authority of Srimad-Bhagavatam.
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, First Canto, Chapter 18 – Text 24-25