The brain’s job to stay safe

I understand the brain will resist creating a new habit because of its job to keep you comfortable. I understand how to do a model and have a new thought about the habit. But how do you override your brain at 6 am (in the moment that needs the pattern interrupt) to get out of bed and go to the gym?