How do you cope with the effects of working remotely?
I work as a programmer on a team of about 15 people, most of them based in Amsterdam. I'm the only US-based developer, living in southern CA, which means to be on their schedule I start work at midnight and stop at 9 AM. While there are other members of the team not in Amsterdam, they are only one or two hours ahead of Central European Time.

I have only worked there for 6 months, so being on their schedule is very important. We have daily standups, communicate via Skype throughout the workday, and will be pair programming more often. Ideally I would be working in their office, but since this isn't a possibility for me personally, I try to work in lockstep with the rest of the team. Originally I thought a night schedule would work out brilliantly, since I am a natural night owl. I was wrong. It's one thing to be in the zone, working on a project until 6 AM and then crashing. Trying to consistently fall asleep during the afternoon, stay asleep until midnight, and then work 9 hours, is a very difficult thing to do.

My sleep schedule has become increasingly erratic; every week I experience at least one or two days where I stay up for an exceptionally long period of time - sometimes 28 hours. This is not by choice but because I simply cannot fall asleep during the day. Other days I will take a 3 hour nap and then be wide awake. I at least appreciate the times I can sleep, so I take advantage of them. I've tried numerous times to stay awake longer so I can get back on track. This doesn't work; often, I will sleep for only 3-4 hours after these 28-hour periods and my mind will be racing. Once I'm awake it's nearly impossible to get back to sleep. My job is not stressful, so the mind racing is less of an inherent problem, but something I view as part of my personality. I don't grit my teeth and I'm not an explosive person, I'm very laid-back.

About a month ago I quit smoking and drinking coffee, something I'm proud of and has resulted in a more even-keeled energy level (e.g. no crashing), and my increased exercise - about 5 days a week now - has boosted my energy level. My girlfriend works as a night nurse, and tries to stay quiet when she gets up at 4 PM to get ready for work from 7PM - 7AM. Our dog usually sabotages her efforts by barking at loud children playing in the street and neighbors walking their dogs after work. Sometimes this is the reason I wake up, other times I just have to go to the bathroom and then I can't fall back asleep. Getting the dog better trained is an obvious course of action, something I'm planning on looking into seriously in the coming weeks.

Our bedroom has blackout curtains, I use ear plugs, and recently I've been doing breathing exercises and some meditation to calm my mind. The lack of a consistent sleep schedule makes all of these efforts feel like I'm trying to put out a forest fire with a garden hose. I have taken Tylenol PMs before, which did nothing for me, but I did recently get prescribed Ambien which may help to reset me every once in a while. I don't want to get addicted.

In short: I love the craft of programming and this is a dream job, I wouldn't trade it for any other job in the world. But the effects of working remotely, on a different time schedule, is eating away at my ability to perform at my peak on a daily basis. It's frustrating at best, and at worse results in mental breakdowns.

So I ask, what are your best strategies for being effective at your job while working remotely? How do you cope with a backwards sleep schedule? Do you have any resources I can digest that will inform me on either of these fronts? In addition to attacking this problem on a personal level, I'm very open to learning about general remote-working strategies at the company level. Thank you for any help you can provide!