I'm hopeless at dealing with boredom. I find there are some times in hospital when I'm just too sick or in too much pain to do anything. If you find this, at these times just concentrate on making yourself comfortable - take the time to make sure you're prescribed the right pain meds, sleeping pills, anti-nausea etc. so even if you're not up to concentrating on anything, the time passes as smoothly as possible.
Once you're well enough to concentrate, you can do pretty much anything online. If your hospital doesn't have patient Internet access, get a dongle. Maybe take a cheap old laptop or tablet, so you don't have to worry about it getting taken if you leave it on the ward.
If you like reading, I started a thread here:
http://www.crohnsforum.com/showthread.php?t=56047 when I was going into hospital and wanted ideas for things to read.
Another way to make use of your time is to exercise, if you can do so safely. Often the nurses will encourage you to walk once you're well enough to do so. I saw a physiotherapist during my last admission, which was for a specific purpose as my right arm and leg were paralysed, but I bet the exercises would help many people who are quite immobile for a long period. Simple things like raising your leg off the bed, hold it for ten seconds, stretching your arms up and holding them up for ten seconds, drawing your knees up to your chest, crouching on the floor then standing up straight, repeatedly sitting in a chair, standing up and sitting down again, etc. Obviously check none of these will do you any injuries before you try them, and people may think you look a bit weird
but it can help you strengthen yourself physically and keep you supple.
If you have a willing friend or relative, a massage can really help with some types of pain and especially if you're feeling stiff from lying still a lot. A nurse once massaged my legs when I was being driven mad by Restless Leg Syndrome, which I sometimes get after general anaesthetics, and I felt much better for it.
One of the least miserable times I spent in hospital was when a nurse, by some miracle, managed to find the time to help me shower, wash my hair, blow-dry it, rub cream onto all my bed-sore areas - maybe you'd feel uncomfortable with this, but when I'm very sick I need help with washing, and having someone take the time to get you all clean and dry and comfortable when you're feeling icky is a good way of passing time. Sometimes I've not been well enough to even get out of bed, and then the nurses have to give you a wash in bed, but I've found there's also a stage where I'm kind of well enough to get up, but so nervous that I'll fall or faint in the bathroom by myself that I blitz myself under the shower for two seconds and rush back to bed, not taking the time to do it properly. It really helps your skin to get properly washed and dried every day, and be thoroughly covered in cream to prevent bed sores if you're lying down a lot. If nurses don't have time, again if you've got a visitor you're comfortable with, you can make visiting hours the time when you get clean and freshen up.