People experience better sleep during the new moon and worse sleep during a full moon, a study found.