If you are having problems getting some shut eye, the answer to a good night's sleep may be written in the stars.