Know your rights. Each city has ordinances restricting the hours in which construction can be done. In New York City, construction can only be performed on weekdays between 7am and 6pm. In San Francisco, it's between 7am and 8pm on weekdays. If the crews are violating these time frames (unless it's an emergency, of course), talk to your landlord, the foreman, or file a noise complaint. This last one is probably the most effective, and can usually be done quickly and anonymously through your city's 311 program.
Prepare for the inevitable. It might be perfectly quiet when you go to bed, but you should stick in earplugs anyway. Your morning self will thank you.
Close the windows. This one is the most obvious, and the one I have the hardest time with. Much like fellow Apartment Therapy writer Catrin Morris, I am a girl who defies stereotypes by being boiling hot at night. I want the windows open and a fan going, even in winter. Since construction started, I've tried to get my bedroom as cold as possible before I go to bed, only closing the windows right before I fall asleep. I hate it.
White noise is your friend. Speaking of fans, get them going. Get your hands on any white noise you can- it won't cancel out the drilling, but it may smooth the edges of it.
Early to bed, early to rise. I've tried adjusting my sleep schedule, and fortunately I'm one of those odd ducks who likes being up in the morning. But if your career demands working late-night shifts, my heart goes out to you. Take a sabbatical maybe? Sabotage all the power tools?
Any other helpful hints? Sleep in a motorcycle helmet? Bribe the crew to start an hour later?