This phrase sounds most benign, almost cozy, removed from the context of Hamlet’s soliloquy. But within the context, it alludes to a huge fear that indeed there may be “something after death” that will not be pleasant!
This fear is surely closely tied to the fact that none of us can conceive of the “nothingness” that so many of us believe will be our ending. It is that inability to imagine nonexistence that creates the stories that many religions perpetrate.
And of course this fear of what comes after death goes hand in hand with our fear of what we will experience leading into our deaths. Most of us wish for what may be a contradiction: we hope to be well prepared for our death (somehow), but also that death will come quickly, painlessly, too suddenly to even surprise us!
We are only able to speculate on what might constitute a “good death”. So best not dwell on these thoughts for too long :-), but it is difficult when friends or family die.