A lot depends on what facilities exist in the hospital near your bed. If you have access to a BT `phone plug which is broadband enabled (many are) and have a USB ADSL modem, it is possible, with some ISPs, to simply plug in and away you go.
I`m not sure they would appreciate the use of a mobile `phone and it could be that WiFi is frowned on also. Probably your best bet is to ask.
Some hospitals use the `bought in` services that hang over the bed, cost a fortune and give TV `phone and internet; so the question may not be appreciated.
They may of course tell you that you are there to rest and they don`t consider surfing to be resting.