Hi Theosam and welcome to the Project Meditation community,
Ok.... if you were aware of everything around you, then you were not sleeping. Whilst sleeping our unconscious does keep in touch with our senses, otherwise we wouldn't be able to be woken by others or by unexpected noises etc.), but our conscious awareness almost 'seperates' from the senses.
What you experienced was likely (from your brief description) a deep state of meditation, where you are in a state of complete awareness of everything, without being attached to any one thing. The one thing that disappears in such a state is the passage of time so, for example, a 20 minutes meditation could seem (after you come back out of it) like you were only practicing for a couple of minutes.
Occassionally we can reach deep states of meditation without trying, sometimes we find it harder, and sometimes we do actually fall asleep. This varies depending on our physical and mental state at the time we're practicing, and even the 'best' meditators can become distracted or fall asleep.