Sleep O2 alert

Would it be possible to create an app that sends an alert thru your watch (vibration) whenever your O2 level drops below 90%?  (while sleeping)