No one loves hospitals. But we need them. If you are over age 70, however, there is a one in three chance that you will leave the hospital in worse overall shape than before you got sick or injured. The phenomenon has become so pervasive that health professionals have dubbed such a problem a “hospitalization-associated disability”—caused not by your illness or injury but by your hospitalization.

But it doesn’t have to be that way. Here are eight secrets that can protect you or a loved one from a downward spiral in the hospital…

SECRET #1: Start out strong. As we age, we lose muscle mass and our hearts and lungs work less efficiently. But we are not helpless. A regular exercise routine—including moves to get your heart pumping, increase strength and improve balance—can help stave off frailty. That will put you in better fighting shape should you ever require hospitalization. So will a nutritious diet. A Mediterranean-style diet, which is rich in fruits, vegetables, nuts, fish and healthy oils, is an ideal choice.

If you know that you are going to have surgery or go into a hospital for some other reason, ask your health-care providers about prehabilitation (also known as “prehab”)—an exercise-and-nutrition program designed to prepare you for the rigors ahead. Specific therapies are available that will help reduce your chances of functional decline from surgery, cancer treatments or other health issues. Depending on your insurance plan, therapy and counseling prescribed by your doctors related to prehab may be covered.

SECRET #2: Document your baseline. Every older adult should (with assistance, if needed) fill out and routinely update a health history sheet, listing health-care providers, medications, major medical problems and, crucially, details about how independently the person handles “activities of daily living,” such as walking, dressing, bathing, housework and navigating the community. This is each individual’s “baseline”—and you want to make sure that all the doctors seeing you or your loved one in a crisis know what it is. Otherwise, they might not realize when you have suffered a setback.

SECRET #3: Stay oriented. When hospitalized, many otherwise sharp older adults can develop delirium, an acute state of confusion brought on by an acute medical illness, in just a few days. If you have dementia or memory problems, you are even more likely to develop delirium in the hospital. So it’s important to do everything you can to keep yourself or a loved one oriented to reality.

Wear your hearing aids and glasses. If the hospital asks to send either of these home for safety, a family member or friend should try to bring these items in for at least several hours per day to ensure that the older adult can participate in conversations, health planning and therapy sessions. Stick to as many daily routines as possible, including getting up to dress, wash up and use the toilet, if possible.

Also: Brush and floss your teeth at least twice a day. This will help you feel more like yourself, and some research suggests that it may even help stave off pneumonia by reducing the amount of oral bacteria that can migrate into the lungs.

SECRET #4: Mind the meds. Ask the medical staff about the risks and side effects of any new medications prescribed. Watch out especially for any that are on the American Geriatrics Society’s Beers Criteria of drugs that are potentially inappropriate for adults over age 65 (known as the Beers list). Some of these medications can cause confusion and other side effects that raise the risk for hospital-associated declines.

If you or your loved one is prescribed one of these drugs, ask to speak with the physician and/or pharmacist about safer alternatives or lower doses.

SECRET #5: Get moving. Within the first week of being in bed, some older adults lose the ability to walk independently. Unused muscles quickly become stiffer and smaller. Lung function declines.

Anyone who can get out of bed should do it—even if it just means shuffling to a nearby chair or the bathroom a few times a day. And don’t depend on flimsy hospital slippers. Walking shoes with good tread and a closed heel are best to prevent falls. Some walking-shoe companies (such as ASICS) make a slip-on walking shoe that is easier to get on and off in the hospital.

If a patient must be in bed, a physical therapist should be called in on day one to prescribe bed exercises and make a plan to get the patient up and moving as soon as possible. Nurses should turn immobile patients in bed every two to four hours to prevent bedsores.

SECRET #6: Speak up for sleep. Despite widespread calls for change, some hospitals still disturb sleeping patients—at all hours of the night—to check vital signs and perform other care. If that’s happening, ask if it’s necessary and if you or your loved one might be left to sleep from 10 pm to 6 am. If there is no medical reason to interrupt your sleep during the night, ask the doctor to write an order to not disturb you between those hours.

Also helpful: Open the window blinds during the day, and turn off the lights at night to keep your sleep-wake cycle on track…and stick to mealtimes and other day and night routines. Earplugs can decrease the inevitable hospital noises.

SECRET #7: Pay attention to fluids. Dehydration can lead to delirium, urinary infections and constipation, all of which can be major contributors to hospital-associated declines. So make sure that you or your loved one drinks plenty of water (at least 48 ounces daily).

SECRET #8: Don’t go it alone. It’s always a good idea to have a loved one with you at the hospital to watch out for signs of trouble and communicate with the medical staff. Having someone stay overnight is ideal. Also: Some hospitals have units, known as Acute Care of the Elderly (ACE) units, staffed by teams of geriatric specialists. Such units have been shown to reduce the risks for functional decline and increase the chances that patients will be discharged back to their homes instead of to nursing homes or other care facilities.

Ask if any hospital near you has an ACE unit. If not, then ask if there’s a geriatrician on the hospital staff who could see the patient if needed.