You might be able to stay in bed and mentally wake yourself up but in my expierences and knowledge, it's better to get up and it's highly recommended.

You can get up to go to the bathroom or read or write about dreams or repeat mantras, you can go on your phone but what I usually do is go on dream views and then I end up dreaming about it.

It's best to actually get up though because it happens so sudden and your not supposed to get up yet and your REM will be high. It's all different for everybody though so I can't say, just expieriment with it and see what's best for you.