Hamlet is suffering from an internal conflict in this scene. He has been struggling with the idea of killing Claudius throughout the play, ever since seeing the ghost in Act 1. He hasn’t been able to make much progress, other than using the actors to stage a scene for Claudius. This scene helps convince Hamlet of the ghost’s intentions and Claudius’ guilt.
But when Hamlet has his greatest opportunity to kill Claudius, he can’t bring himself to do it. The king is praying at the time. To Hamlet, this means that if he kills him now, while he is communing with God, the king will go to heaven. So Hamlet says:
Up, sword; and know thou a more horrid hent:
When he is drunk asleep, or in his rage,
Or in the incestuous pleasure of his bed;
At gaming, swearing, or about some act
That has no relish of salvation in't;
Then trip him, that his heels may kick at heaven,
And that his soul may be as damn'd and black
As hell, whereto it goes.
Hamlet’s stated conflict is that he must wait for a time to kill the king when he will be damned to hell. The reader, however, gets the feeling that Hamlet might just be stalling. Why should the time of death matter regarding the disposition of his soul?
If Hamlet felt no conflict about the act, he would have done it already.