Wait, this is a pure software app? I don't have much expectations for it in that case. But, you can get pulse oximeters with bluetooth and reverse engineer the protocol. I think to do sleep tracking for real, you want EEG sensors. Look up OpenEEG for a hardware effort.
I think I understand, I'm not aiming for perfect here. I will never expect to get the results as dead accurate as an actual clinical type 1 polysomnographic session. That being said, so much can be inferred with so little data to go off of.
Some sleep trials use portable machines nowadays that the user wears to bed at home. While they're equipped with objectively better sensors, it's hard to lose hope in my app. I know this has been done before, there are paid apps for polysomnography for Android. Typically they'll have oximeters at the worst and the same equipment as a type 1 at best. With our phones, the goal isn't so much to diagnose as it is to evaluate changes over time, and alert us if something seems likely.
I'll definitely think about bluetooth pulse oximeter support, but please keep in mind that I'm hacking away at it for less than minimum wage.
There are also wristbands with accelerometers used for sleep tracking. That might be better than strapping phone to yourself, plus they can measure heartbeat. For polysomnography do you also want to measure respiration? That is yet more hardware, but EEG seems like the big step past stuff like Fitbit, which is supposedly not very good. I am a bit interested in this stuff though haven't tried it. I don't think I'd bother with a phone app.
Tbh the best case would an open source fitness tracking watch. After some research the two hardest things are pulseox(even garmin watches are kinda inaccurate on ox) and battery life. I think its possible but most open source watches aim at the budget sector while a real fitness tracker sadly needs to be pretty expensive. It would be pretty cool if you had a bunch of sensors and you could just do anything with them(make custom workouts, sleep tracking, etc). If you think about it a smartwatch om hardware level is basically a nunch of sensors and the software just takes data, processes it and then spits out new data thats easier to understand.