Hello, I have degrees in math and computational physics. I have been writing matlab code for over 5 years. I can write you an algorithm to classify your sleep data. I specialize in analyzing and finding trends in large data sets. If you could tell me what your data looks, I am positive I can help you with your problem.
Clay