Almost everyone has trouble sleeping at high altitude (see the section on altitude acclimatization for further explanation.) Most sleeping pills, however, can be dangerous and actually predispose you to altitude sickness.
If you’re acclimatizing, acetazolamide can help a lot with the periodic breathing that disturbs sleep. Melatonin is an OTC sleep aid that helps many and has no contraindications at altitude. One prescription sleep aid that has shown NOT to disturb breathing at sleep is zoldipem; you may want to discuss taking this medication with your personal physician. Any other hypnotics/tranquilizers should probably not be used at altitude.