Staying at her house is a good idea.
The whole bus thing has me confused though. Have you told your friend about the bus timing? Frankly, if you're doing her a favour and the only bus option gets you to her house at 4:50am, at the very least, she should welcome you in with a nice cup of tea. If she's not willing to repay you with kindness at that hour of the morning, she should be finding someone else to help.
Taking it further, I think that when your friend finds out how silly the public transport options are, she should offer to pay for a cab for you. It's ridiculous to expect someone to be up that early and to travel on public transport.
I'm curious as to why your mother will be upset. You're 21 years old! You're an adult and providing your decisions don't have an effect on your parents, it's none of their business. Having said that, perhaps your mother feels that you're being taken advantage of? Please give us your mother's point of view.
Never regret anything that has happened in your life. It cannot be changed, forgotten or undone. So, take it as a lesson learned and move on.