I have this problem that I run into every few weeks. I spend too many hours coding or doing some type of server upgrade or migration. Time gets lost and I realize I have been awake for 24 hours! This is always a problem because quickly my time schedule shifts and I am waking up at 1am like today. I really hate when this happens, it just feels so draining to wake up and have no sun outside. People in Alaska deal with this everyday for six months straight. I would probably fall into depression if I lived in Alaska because I notice when I get into this schedule I start to feel unmotivated and some things take longer to accomplish. The biggest problem is that I am falling asleep at 5pm in the afternoon and Erica gets home at 6pm. I also get delayed in returning calls and communicating with important people that I do day to day business with.
So that is the problem, what is the solution?

It is inconvenient but the solution is not to wake up at 1am but sleep until 7am. That means I will sleep for 14 hours which is tough to do for me but its better to do that then spend days unproductive. It is 1:36am and I am going to try to go back to sleep!