It's not really bad for your health or anything to have the computer in the same room you sleep in but I found that when I had my desktop computer setup in my bedroom where I sleep I got less sleep for some reason.
Probably due to the sound of the desktop computer and the lights on the computer.
When I moved my desktop computer into a separate room and only used my bedroom for sleeping I found I got much better rest.
So if you're not sleeping that great then I would recommend moving the desktop computer into another room away from your bedroom and you should notice a difference in your sleep.
It's also less distracting that way since your computer will be in another room than your bed is.