how to improve your sleep while in the hospital

Bring your own pillow and blanket. If you are particular about your bedding or pillow, bringing your own may dramatically improve your quality of sleep. If you would take your own pillow for a hotel stay, do the same for a hospital stay. Packing for a comfortable hospital stay can make a huge difference in your comfort.
Ask for medication to help you go to sleep. Some medications, such as Ambien, help people fall asleep faster, which can be very helpful. If you take sleep medication at home be sure to mention it to your care team, as they may be able to add it to your hospital medications.

Ask for medication that will help you stay asleep. If you are having trouble staying asleep, or you can’t return to sleep after waking in the middle of the night, ask for something that can help. Over the counter medications such as Unisom and Benadryl are often used for this purpose.
Stay awake during the day and only sleep at night. Avoid taking naps so that you are ready to sleep through the night when the time comes. If you are exhausted, by all means, take a nap, but too much sleep during the day can mean not sleeping well at night.
Close the door to your room. Unless a patient is in the ICU, closing the door is not typically a problem and can dramatically reduce noise from the hallways and other rooms.

Use earplugs. If closing your door isn’t enough, wearing earplugs may be just what you need to tune out the ambient hospital noise and get some well-deserved sleep.
Use a sleeping mask. Something to cover your eyes will work wonders if the light from the hallway or outside the window is making sleep difficult to obtain.
Request no visitors in the late evening/early morning. If you have trouble dozing off when you have company, make sure you don’t have company when you are trying to sleep. Some people are comforted by the presence of friends and family, others find it difficult to sleep with an audience.
Use white noise. If you are still struggling with noise, many smartphones offer free white noise applications which can help mask the sounds of the hospital. Others prefer to use the television, music or even a fan to deaden outside sounds. Most hospitals will happily provide a fan for this purpose, especially if it means you feel rested and well faster.