I have noise from neighbors and outside the apartment, so I use earplugs and sound machines.

Rather than a sound machine, you can also get CD's with white noise, rainfall, etc., and play them till you sleep, or put them on "repeat" to run all night.

Another option is to have a spare bed handy for nights that you can't sleep due to noise - but you run the risk of liking it and deciding to go to it regularly, lol.