The National Sleep Foundation (NSF) recommends setting the temperature between 60 and 67 degrees Fahrenheit for optimal sleep.