Comprehensive way to track sleep over time

Something that works better than the smart watches and bands, and gives me the feedback/data necessary to consistently improve quality my sleep over time.

Maybe it tracks other variables, like caffeine consumption, water consumption, meal timing, activities before bed, and learns based on what works for you.