Most humans tend to integrate these two distinct actions and view them as one, which, going back to Buddhist philosophy, causes them to suffer. But suffering is not necessary. New possibilities can be created when we separate these phenomena.
Joseph Emet's Buddha's Book of Sleep: Sleep Better in Seven Weeks with Mindfulness Meditation is a book which those who do have trouble sleeping will find eminently useful -- if they approach it with patience and a willingness to do the necessary work.
I will attempt to explain Buddhist ideas using a different language, a different vocabulary, a different methodology, that should be familiar to those who work with mathematical and statistical models.