I only know demons to exist in levels of intelligence, and dimensions, sometimes organized into groups, sometimes they posess people or attatch themself to you. "Demons" is such a loose term because most people think of something evil or negative whereas the original understanding of a demon was not always evil but a spirit in fact. I do not remember the EXACT origin of the word but it was spelt something along the lines of "daimone" or "daemon".... there were daimones that felt the need to help and guide people, and there were daimones that felt the need to be malicious towards humans, therefore they were later categorized by christianity as "demons" and "angels"... HOWEVER... i personally have experienced that daimones(spirits) are JUST spirits, and the only thing that makes these "daimones" an angel or a demon is their affiliations with darkness or light. Are they a follower and soldier of yahweh? Or are they a follower and soldier of the force of evil/satan... You do not have to look at it from a religious standpoint... but it will not eliminate the fact that both the power of destruction is out there and the power of healing is out there, you can see it cosmically as the power of void, or the power of projection. Negative space, positive space. You can see it as human morality murderers and rapists, or people who save others and aid in the taking place of justice. No matter what, it exists...
With all that being said, you now have a basic idea of the nature of spirits, next you need to understand that they exist in the same way us critters of the earth exist but in a DIFFERENT realm/dimension/plane of existence.... some have a high level of intelligence, are multi-demensional and full of light. Some are equally intelligent, very multi dimensional. but rather than filled with light they are dark and "inward" they can appear like shadows and move like shadows. folding in on themselves, disappearing into the shadows... all of that good stuff ;)
Its best not to judge any person or creature or spirit based on the color of their skin, their energy, their fur, their eyes... etc. because we are in a physical plane of existence and the only one we know of, that means the rest are of the spiritual sort. A good model to judge a spirit by is by it's intentions or actions towards YOU, or ANYONE else... This is because the material plane makes an effective model to create universal morality on; We know as humans that to say something slightly hurtful is bad, but to actually punch someone in the face takes it one step further... it is the same in the spiritual sense. some spirits dont understand (best to banish them from your space in the physical plane and possible the spiritual if it becomes a problem), some spirits just DO NOT care... those spirits need to be completely banished from your realm entirely. Best to pray to the highest most all-knowing god that exists that he/she will send someone to effectively deal with the spirit that is harassing you. its also good to cleanse yourself of ANY and ALL evil energies. (everything from cleaning your house, taking a shower, eating healthy, drinking lots of water, to things such as choosing NOT to watch anything violent on tv, and staying away from things such as pornography, and try to keep your mind on things that are healthy and cleansing to you)....
This is what I gather from your experience:
what you experienced was really no different than a "freak accident" or you could even call it a "spiritual anomaly" in the spirit realm... it doesnt seem evil or good... and if it was evil, something was protecting you, or something was keeping it from harming you. it could be religion or it could be your own choice to lie down on the bed and keep calm, despite the fact that there was a SHADOW hovering above your bed... that simple action could easily make a spirit feel uneasy about moving in on you... i personally feel like this was a very odd experience... not your average demon... not average in the sense that it probably had a low-frequency, and not average in the sense that it is not affilliated with anything and it was probably there, JUST for you... maybe a spirit you knew in previous lives or is connected to you, or concerns itself with you. there are many reasons why it might have left. it could be that it no longer had the energy it needed to manifest itself, so it began to shake like that and leave. I KIND OF feel like this was the sort of spirit that may be bad by nature, and has no other form of existence and left because you stood up, some would not be so brave. Spirits like this usually do not do much else but hover and linger, they maybe there for a reason but its nottoo much of a big deal, remember though that this type of spirit, if it is in your space, needs to be under supervision and control by you, you need to be able to effectively vanish it and study it without allowing it permanence in your life, sometimes daimones do not understand boundaries and the differences in human and spiritual existence. i also feel that this "demon" is a very low, base-level of intelligence... not like a multi-dimensional... 2 D at the most? maybe?
the fact that it happened at 3 in the morning and you were very thirsty is notable. 3 am is the end of the witching hour, and thirst can often be associated with demons, especially spirits of hunger... and usually they are wearing capes. usually they have no other intention that getting some energy and then leaving.. sometimes they attatch themselves but that does not seem to be the case with you...
do some digging. journal all the details of that night. what you ate, what you drank, if you had been pondering certain things, if there had been any recent spiritual changes in your life. anything and everything may cause the truth to be revealed if you analyze it long enough.