I never had the desire to get on-line while in the hospital...
I was quite content to spend what time I had NOT jumping through hoops for various therapists and so forth watching TV, reading, or sketching.
I also did a lot of walking up and down the hallway where I was.
There was a computer in the step-down unit I was in and it was "on-line" because I watched a few different staffers use it to look up various things, but I never thought to ask about using it to check email or anything. Guess maybe I could have.
Chances are, unless you happen to live in the same place the hospital's located, you won't be able to use your own ISP and modem on a laptop. It would incur long distance charges and possibly other problems.
If there are terminals available for patients, that's probably the best route to take.
Don't plan on sitting at the computer very long though. In recovery at least, you're BEST ticket out of the hospital is walking as much as you can. That really does have a great effect on how fast your recovery is.
Helped my state of mind too, was going batty sitting on bed all day long. =)