Nothing external will change, so there's no sense fretting about my environment naturally suiting my psychology, because that'll never happen. That's a fantasy. I'd code til 3am too (and have, far too many times) but I've come to believe my job in the present is all about setting up future me for success. Present me tends to have shitty ideas about what to do in the present, but plenty of great ideas about what I should have done in the past or should do in the future. Without being critical of present me, I'm likely to fuck things up properly. I need to focus on the scaffolding for those great ideas for future me and less on the shitty ones for present me. That guy is already a lost cause.
My strategy is one of delayed gratification, which my brain hates. I lay down with a book at 9 or 10pm because it'll put me to sleep in a hurry even though my brain is typically WIRED when I lay down. Yeah it doesn't feel like bed time, but it sure as shit is bed time. I'll do other things like keep shitty food out of my home, because otherwise I'll find really good reasons to eat (too much) of it. I put EVERYTHING in my calendar because although present me is positive future me will remember, that's totally incorrect and I actually do need frequent reminders of pretty much everything I'm not immediately focused on or interested in. I leave my phone behind because even though I'm sure I won't use it too much, yeah, I definitely will. Expect the worst from yourself and prepare accordingly.
So, the world isn't my problem, I am! I'm my worst enemy. The path to defeating myself is doing a lot of stuff I don't feel like doing. I like this approach because rather than being mad at the world for my failures, I'm forced to do something about it.
That's my experience, anyway.