1) Any productivity gained over that one-or-two-day session makes very little difference in the big picture. Even a week.
A company/product/feature is never going to live or die on that 30 hours of coding that you managed to squeeze into 48 hours. 99.999% of the time you're doing it to calm people's nerves or make someone (yourself? PM? EM?) look good.
2) My reasons for doing these marathon sessions was a lie.
I told myself that I'm doing it because I love the product, love the work, love this, love that. I'm an artisan, I told myself. A professional. Work is my life. Isn't it the same for those Japanese knife maker guys? I'm like those guys. I live this work.
The real reason was fear. Fear of not being the best, fear of not being successful, etc. I felt like I didn't have a place among MIT/Stanford grads. So I compensated with brute force.
--
It didn't help that I was rewarded with more money, more respect, and more decision making power. I was even rewarded with more knowledge than everyone else -- you learn a lot working 12 hours a day. And if you screw something up you have plenty of time to fix it.
Wrote a nasty bug? No problem, ship a fix at 11:30pm and the impact is minimal. People are much less likely to criticize you if you're the person sitting up at 11:30pm shipping to production. Clearly your heart is in the right place, right?
The "trick", I found, was to work for people who NEVER EVER demanded more than 7 hours a day from me BUT also appreciated that I'd go well above and beyond expectations. Now that I think about it, it reminds of drug dealing (or the little I know about it from when I was a teen).
I feel fortunate that I was able to disassociate my fear of failure from my genuine love for the work. These days I'm able to be very productive and lead a relatively healthy life but it took waaaay too long for me to figure out how.