The second one is called sleep paralysis. It happens because your mind wakes up before your brain releases the chemicals into your body that activate it. therefore you are aware of your surroundings but your body is asleep. apparently it happens to about a third of people at some point in their lives. I used to get it when i was about 17-21 and only a handful of times.
Sleep paralysis has been the basis for many myths throughout the ages. some people thought that demons/incubus sat on your chest, hence the inability to breathe that well.