Yes, sleeping pills were routinely prescribed by doctors a few decades ago to ensure a good sleep at altitude. Because they depress respiration, a critical factor in acclimatization, taking sleeping pills, sedatives,or tranquilizers is generally not recommended. That said there are some studies on agents such as temazepam that imply that they do not depress respiration at altitude. Temazepam stays in the blood a long time, and could have and effect on energy levels and motivation. On a climb to 7500 meters that I participated in, two individuals who took a similar drug at altitude were very sluggish the next day, and one climber did not have enough drive to get to the summit. Very short-acting agents have not been studied, but they might also be effective.