Then they for sudden joy did weep / And I for sorrow sung: These lines parody the opening stanza of the "Ballad of John Carelesse," who was a legendary Christian martyr. Here's the stanza:Some men for sodayne ioye do wepe,The lesson of the ballad is that true Christians, faced with the prospect of martyrdom, can find joy in their faith, and profound meaning in the sacrifice of their lives. In contrast, the Fool's parody makes the point that Lear's sacrifice of his kingdom to his daughters was childishly stupid.
And some in sorow syng:
When that they lie in daunger depe,
To put away mournying.
(Quoted from 'KING LEAR' AND THE BALLAD OF 'JOHN CARELESS'. The Modern language review. Vol. 15 (1920). 87-88.)