‘Nero’ ‘inmost’ ‘legitimate’, and ‘pop’ set up a web of associations that link King John and its source play, The Troublesome Raigne of Iohn, to Hamlet and King Lear.

The Troublesome Raigne opens not unlike Richard II. A weak king is introduced by hearing a suit. Robert Falconbridge brings a suit against his mother and older brother Philip, who he claims is the illegitimate son of the former king. Partway through the hearing, Philip decides that being the bastard son of a king is a better deal than being the legitimate son of a dull country squire. Queen Eleanor adopts him as an honorary grandson, but he stills wants to know the truth from his mother. When he is alone with her after the trial, he seeks to force a confession from her and threatens to act like Nero:

And here by heauens eternall lampes I sweare,
As cursed Nero with his mother did,
So I with you, if you resolue me not.
(Troublesome Raigne 368-370)

The mother’s confession of infidelity paradoxically wins the son’s gratitude.
The image of Nero hovers over this dispute as a whole. Queen Eleanor had earlier chided Robert for his conduct toward his mother:

Ungracious youth, to rip thy mothers shame
the wombe from whence thou didst thy being take,
All honest eares abhorre thy wickednes,
But gold I see doth beate downe natures law.
(Troublesome Raigne 131-134)

And the mother echoes this rhetoric:

Let not these eares receiue the hissing sound
Of such a viper, who with poysoned words
Doth masserate the bowels of my soule.
(Troublesome Raigne 140-142)

Shakespeare’s Bastard is less violent with his mother, but an echo of the older play seems to show up in his tirade against the treacherous English barons, which collocates ‘Nero’ with ‘rip’, ‘shame, and ‘womb’:

And you degenerate, you ingrate revolts,
You bloody Neroes, ripping up the womb
Of your dear mother England, blush for shame;
(KiJ 5.2.151-152)

It seems likely to me that the mother-son scene in the Troublesome Raigne shaped the closet scene in Hamlet. One clue is Hamlet’s comparison of himself to Nero:

O heart, lose not thy nature! let not ever
The soul of Nero enter this firm bosom,
Let me be cruel, not unnatural;
I will speake daggers to her, but use none.
(Ham. 3.2.394-396)

Hamlet as Nero generates the King’s name as Claudius, the predecessor and uncle of Nero. Gertrude thinks of her son as a kind of Nero when he says:

Come, come, and sit you down, you shall not boudge;
You go not till I set you up a glass
Where you may see the inmost part of you.
(Ham. 3.4.18-20)

This is very much like “masserate the bowels of my soul” in The Troublesome Raigne, but Gertrude understands it literally and exclaims “What wilt thou do? Thou wilt not murther me? ” (Ham. 3.4.21). “Inmost” occurs only once in other Shakespearean plays, when the mad Titus looks for justice:

‘Tis you must dig with mattock and with spade,
And pierce the inmost centre of the earth;
(Tit. 4.3. 11.-12)

So ‘inmost’ is associated with the earth/mother.
There are additional verbal and scenic links between the mother-son scenes in The Troublesome Raigne and Hamlet. Hamlet dwells in great detail on the physical difference between his father and his uncle, and Philip points to the physical differences between him and his brother Robert. As Philip works up to the climax of his threat against his mother, he utters a phrase that sounds like a famous line in Hamlet:

Nay, what is he, or what am I to him?
When any one that knoweth how to carpe,
Will scarcely iudge vs both one Countrey borne.
This Madame, this, hath droue me from myselfe:
And here by heauens eternall lampes I sweare,
As cursed Nero with his mother did,
So I with you, if you resolue me not.
(The Troublesome Raigne 364-370)

Here is Hamlet’s response to the Player’s speech:

What’s Hecuba to him or he to Hecuba
That he should weep for her?
(Ham. 2.2.559-560).

The dispute between Robert and Philip Falconbridge about land and legitimacy left clear traces in the quarrel of Edmund and Edgar and may stand behind the curious remark by Edgar/Poor Tom: ” Frateretto calls me, and tells me Nero is an angler in the lake of darkness” (KiL 3.6.6-7). Commentators refer this to a passage in Chacuer’s Monk’s Tale where we are told that

Nettes of gold threed hadde he greet plentee
To fisshe in Tybre, whan hym liste pleye.

But clearly Edgar’s phrase refers to Nero’s obscene curiosity, which Chaucer summarizes a few lines later:

His mooder made he in pitous array,
For he hire wombe slitte to biholde
Where he conceyved was

Does Edgar remember Nero because Shakespeare remembered the quarrel of Robert and Philip? Consider the associative links of the words ‘legitimate’ and ‘legitimation’. Legitimacy is a key concept in Edmund’s soliloquy:

Well then,
Legitimate Edgar, I must have your land.
Our father’s love is to the bastard Edmund
As to th’ legitimate. Fine word, “legitimate” !
Well, my legitimate, if this letter speed
And my invention thrive, Edmund the base
Shall [top] th’ legitimate. I grow, I prosper:
Now, gods, stand up for bastards!

‘Legitimate’ twice collocates with ‘land’ in King John. Robert asks for “my father’s land,”, but the king replies that “your brother is legitimate” (KiJ 1.1.115-116). In the scene with his mother, the Bastard says:

But, mother, I am not Sir Robert’s son,
I have disclaim’d Sir Robert and my land,
Legitimation, name, and all is gone;
Then, good my mother, let me know my father;
Some proper man, I hope. Who was it, mother?
(KiJ 1.1.246-50)

There is of course nothing particularly surprising about the collocation of ‘land’ and ‘legitimacy’ since in an agricultural society disputes about legitimacy are inescapably bound to disputes about land. But the resemblances stretch further. Edmund makes much of the fact that “the lusty stealth of nature” (KiL 1.2.11) makes for men of of “more composition and fierce quality” than “the whole tribe of fops” “got ‘tween asleep and wake” in the “dull, stale, tired bed” of marriage (KiL 1.2.11-15). Similarly Philip argues that Sir Robert could not have begotten him:

Madam, I was not old Sir Robert’s son;
Sir Robert might have eat his part in me
Upon Good Friday and ne’er broke his fast.
Sir Robert could do well — marry, to confess —
Could [he] get me. Sir Robert could not do it;
We know his handiwork. Therefore, good mother,
To whom am I beholding for these limbs?
Sir Robert never holp to make this leg.
(KiJ 1.1.233)

This theme does not recur elsewhere in Shakespeare, and a little detail clinches the case. Robert relates his father’s dying testimony that Philip was not his son

And if he were, he came into the world
Full fourteen weeks before the course of time.
(KiJ 1.1.112-113)

Edmund expostulates:

Wherefore should I
Stand in the plague of custom, and permit
The curiosity of nations to deprive me,
For that I am some twelve or fourteen moonshines
Lag of a brother? Why bastard? Wherefore base?
(KiL 1.2.2-6)

Since Robert’s lines immediately precede the exchange between him and the king quote above (KiJ 1.1.115-116), the two plays share the triple collocations ‘fourteen’, ‘legitimate’, and ‘land’ within the space of four and eleven lines. That is fairly powerful evidence for textual interdependence.
We may also observe the three Shakespearean occurrences of the unremarkable verb ‘pop,’ in which an adulterous ‘popping in’ pops somebody else out of his property. The sexual meaning is most explicit in Troilus and Cressida when Patroclus says to Menelaos:

But that’s no argument for kissing now,
For thus popp’d Paris in his hardiment,
And parted thus you and your argument.
(Tro. 4.5.27-29)

In King John, there is no explicit sexual reference, but the mother’s honor is very much at stake when the Bastard objects to Queen Elinor’s accusation that he casts shame on his mother:

I, madam? No, I have no reason for it;
That is my brother’s plea and none of mine,
The which if he can prove,’a pops me out
At least from fair five hundred pound a year.
Heaven guard my mother’s honor, and my land!

These two passages illuminate the most famous occurrence of the word in Hamlet’s description of Claudius as

He that hath kill’d my king and whor’d my mother,
Popp’d in between th’ election and my hopes,