Like others said, it's best to have some time between the computer & sleep to let your mind settle down. You probably think too much when you're trying to get to sleep so even though you're in bed you can't go into deep sleep. Meditation is a good way to clear the mind again. If you're napping a lot during the day, it makes sense to awake at night. I'm definitely not a professional, but if I were you, I'd try doing something during the day that would tire me out enough to get a good night's sleep. (like exercising, or something...) Sorry, not that much help but I hope you start to get some sleep. c:
I've noticed I can't sleep straight after shutting down the computer, allow yourself a decontamination zone when you need to get to sleep, half an hour or so. If you shut down then hit the sack right away I find that you're too wired to sleep, and if you're distressing yourself because you can't sleep, you'll keep worrying yourself awake.
I would recommend meditating for 20 minutes or so (which you can do lying down).
^They've got an excellent point. Namely, I find it hard to sleep while my brain's abuzz with activity. Stop trying so hard to go to sleep. Getting yourself worked up over it only worsens the matter. Try focusing your thoughts on a central idea. Just lie down, close your eyes, and center your thoughts around one thing: like an apple tree, or your favorite piece of artwork, or even just a train of thoughts with a common point. (Just think of something you like to think about) Rushing thoughts can be one of the most frustrating causes of insomnia in that way.
Most people suggest reading a good book because a book centralizes your thoughts around a single story. It gets your mind on a one-track stream of consciousness. I often find myself dozing off after a few chapters, at which point it's the time to put aside the book and continue the one-subject thoughts in peace with my eyes closed.
Something I read that has helped me is to either 1. repeat one word over and over in your head in a soothing manner and try to do the action of the word you say. My word is "relax" and you just repeat it while slowly relaxing all of your body.
Another thing is to picture a black tv screen or a black curtain. You slowly clear your mind and focus on this curtain/tv. If thoughts come to you, you acknowledge them and then think to yourself that you will address them in the morning but now it is time to relax.
Don't stress about sleeping. Keep the lights off, find a comfy position and just chill. IT may take a while but you can train your body to fall asleep easier.
Try working out daily (or every other day). Set a slow paced bed time routine. Don't eat or drink after 8 pm and don't drink caffeine after 4pm. Turn off computers, TVs, cell phones, etc. 2 hours before bed. Settle down to a calming/boring book (I choose classics because while they are interesting they also make me extremely tired late at night) before bed.