Question on cats

I've had my two cats since they were few weeks ago(now 1)  I've heard cats can sense there owners emotions and such ( from what I've heard) not sure if true or not. Let's say if you're cat sits on top of you or sleeps right next to you. Is it just the comfort or sense of something? Strange question just curious.