Ios-alarm is a project mainly written in OBJECTIVE-C and C, it's free.
iOS Alarm Clock: Track your sleeping patterns
A simple tool to track your sleeping patterns: bedtime and hours of sleep.
Eventually, this tool might do more, such as wake you up, but I'm not there yet.