Scientists have known for a while that blue light, like that emitted from laptop screens and smartphones, stops you from getting to sleep.
Now Apple's latest iOS release, 9.3, will include a feature called "Night Shift" that dims your phone screen after sunset.
From the Apple website:
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. Pleasant dreams.
There's no release date yet for iOS 9.3, but it's already available to developers who've signed up for the public beta.
Filtering out the blue light can improve your sleep quality and your mood.
In a study of 20 people, those who wore blue-blocking amber safety glasses for three hours before bed reported significantly better sleep quality and mood than those who didn't.
For those who don't want to walk around in amber glasses, apps such as f.lux can dim your laptop screen and give it an orangey glow. But until now there's been no way to dim your iPhone screen at night in the same way (without jailbreaking it).
Just don't use this as an excuse to stay up all night on your phone.
Kelly Oakes is science editor for BuzzFeed and is based in London.
Contact Kelly Oakes at email@example.com.
Got a confidential tip? Submit it here.