Yes. iOS and many Android smartphones have features that allow users to set the timings for night mode so that it can activate automatically. Your phone will automatically turn darker during the nighttime and switch back to light when you wake up.