I call this daydreaming. It happen to me in class sometimes. I dont close my eyes but i loose awarness. And when i realise it us happening i get out of it. Same thing happen when i am in bed trying to sleep. If you dont realise it is happening you will sleep normally if you do you will return to reality.(I don't know if you are talking about this but I think you are)