I really should not be allowed to operate electronic devices after midnight.

If you look at my email history, you’ll see most of my race registrations are time-stamped with ungodly hours: my first 5K registration was completed shortly after midnight on New Year’s Day; my first half marathon, at 3:21 a.m.; my first Ironman triathlon, 4:09 in the morning. Most recently, I signed up for my first 50-mile ultramarathon during a 3 a.m. tussle with insomnia.

Some people watch late-night infomercials. Some people raid the fridge for a midnight snack. I click the “Register” button.

Then the morning comes, and proof of my questionable decision-making is right there at the top of my inbox: Congratulations! You are now registered to have your ass handed to you at the most mountainous of marathons! What the hell were you thinking?!?

What the hell was I thinking, indeed. My husband wishes I would just buy stuff on amazon.com instead. It’s cheaper than race registrations, and they have a very generous return policy.

What’s really surprising about my late-night habits is that I’m not alone. Almost every runner I know has sat in the darkness, illuminated only by the light of a screen, their finger hovering over the “Register” button. We aren’t on the race websites because of insomnia—our insomnia is caused by the race website. A new distance or bigger challenge is so exciting, it keeps us up at night.

“Screw it,” we sigh. “I’m in.” It’s easy to be bold in the darkness.

Research has shown why. Sleep deprivation, even in minor doses, causes increased brain activity in the regions that process optimism, while suppressing the areas of the brain that evaluate consequences. It’s the reason why casinos remove their clocks and black out their windows—the later you stay up, the more likely you’ll push in all your chips on a risky hand.

In other words: How bad could it be, really? Screw it, I’m in. But for runners, the morning light reveals more than a bank deduction for race fees—now we have to run the damn thing. The optimism fades away and panic sets in.

And for that, I’m grateful.

Too often, we’re told to think things through. “Sleep on it,” the reasonable people say. “Don’t make a dumb decision.” Caution is praised over chutzpah, and I’m not so sure that’s a good thing. Caution makes people overestimate risk and shrink from opportunities. It makes us close out the computer screen and focus on more reasonable goals. Caution is safe. Caution is really, really boring.

So yes, we make bad decisions at 3 a.m. But then a funny thing happens—they end up being the smartest things we’ve have ever done. There’s something incredible about setting a goal beyond your current abilities: It scares you into doing the work. The sun eventually rises, and so do your anxieties: What the hell were you thinking? And then you realize there’s no return policy on that race registration. You pushed all your chips in.

If you want to win, you best get to work.