i sometimes think that if the kind of dreams we had were determined by the thoughts and emotions we have immediately before sleeping , then people would pay close attention to their emotions and thoughts , and clear them up before going to bed .