Apple has announced that the next update to their mobile operating system for iPhone and iPad will help you fall asleep at night.

iOS 9.3 will include a new feature called “Night Shift,” which will adjust the colors coming out of your phone or tablet’s screen so they’re easier on the eyes in the evening hours.

Apple writes on their newly released iOS 9.3 preview page, “Many studies have shown that exposure to bright blue light in the evening can affect your circadian rhythms and make it harder to fall asleep. Night Shift uses your iOS device’s clock and geolocation to determine when it’s sunset in your location. Then it automatically shifts the colors in your display to the warmer end of the spectrum, making it easier on your eyes. In the morning, it returns the display to its regular settings.”

It’s safe to say that most of us look at our phone for a decent amount of time in bed before trying to fall asleep. Now, Apple is ensuring we can continue to enjoy SnapChat, Instagram, and Facebook before bed without effecting how easily we can fall asleep.

This is also great news for those of us who like to read on our iPads before bed.

Research has been reporting that blue light has a negative affect on sleep for at least a few years. Wrote Harvard University in a May 2012 health letter:

At night, light throws the body’s biological clock—the circadian rhythm—out of whack. Sleep suffers. Worse, research shows that it may contribute to the causation of cancer, diabetes, heart disease, and obesity.

But not all colors of light have the same effect. Blue wavelengths—which are beneficial during daylight hours because they boost attention, reaction times, and mood—seem to be the most disruptive at night. And the proliferation of electronics with screens, as well as energy-efficient lighting, is increasing our exposure to blue wavelengths, especially after sundown.

The feature is similar in nature to a Mac and Windows app called Flux. Funny thing: Flux’s developers actually tried to launch the app in the iOS App Store in November, but ended up being rejected by Apple for violating the rules. We wouldn’t be surprised if Apple’s real reason for getting rid of Flux was because they had their own version in the works.

iOS 9.3 will also include better security for the Notes app and improvements to the Health app. Apple has not set a release date for the software update, but a new beta was released to developers today.

Hooray for a better night’s rest!