A. Ketzos Hashulchan (138: n.31) and other Poskim maintain that one suffering from insomnia or fatigue is permitted to take sleeping pills to stimulate sleep. He argues that it is not considered a 'Refuah" or healing, which would be prohibited on Shabbos, since lack of sleep is not in itself a sickness and the pills taken are not a cure
Rabbi A, Bartfeld as advised by Horav Shlomo Miller and Horav Aharon Miller Shlit'a