When does Hamlet conceive of this plan?
This is the first mention of it and he’s had no time to mull, no time to turn it over.
It all happens very quickly –
1) See Father’s Ghost
2) Find out father was murdered by uncle (and also that his dad has to spend time in hell)
3) Discover friends nearby, who also know Father is a ghost
4) Swear friends to secrecy with Father’s help
5) Suddenly, seemingly from nowhere decide to act a little crazy back in their normal lives
It seems like the sort of plan that should be calculated. But maybe, given that he’s already acting a little crazy in this scene, the idea occurs to him as he watches his friends try to solve his mystery. Maybe, in tasting the cake of crazy, he realizes it could be very very useful. Crazy is a cover and a release. He had not made a fuss before now. He’s been polite with his family, taken the loss of father and crown with restraint and political posturing – but now, as the ghost leads them willy nilly around the space, now, perhaps, he sees another way.