The realisation of figuring out your dreaming was enough to wake you up. The more lucid dreams you'll have you'll learn to cope with it more naturally.

The best thing you can do after doing an RC is to simple stand there and to take in your sourroundings, feel some objects and try and just understand that everything is a contruction of your mind and you have the power and will to stay there for as long as you want. It just takes time. I'm still working on it to to be honest.

Good luck