Staying awake until 3:00 AM is not always a bad thing and it's not unhealthy to stay awake until 3:00 AM unless you're not getting enough sleep at night.
On weekends I will stay up until 3:00 AM and sometimes 4:00 AM just browsing the internet and then I sleep in late the next day so I get plenty of rest.
So as long as you sleep enough through the night after going to bed it's okay to stay awake until 3:00 AM.
However if you're staying awake until 3:00 AM and need to be up sooner such as for school or work and you're always feeling tired the next day and only getting a few hours of sleep per night then it becomes unhealthy.
Not getting enough sleep can cause heart disease, strokes, heart attacks etc.
You'll also have slower reaction times which could put you at risk for a car accident or any other accident.