There is no danger in walking, getting up, or not sleeping.
The only problem of not sleeping is that you may feel tired the next day. Other then that, you should pay your visit to the restroom whenever you feel like. Always listen to your body. It is smarter then you or enyone else.