Purpose The aims of this study were to evaluate whether or not there are gender differences in drug use at hospital admission and prescription at discharge and to evaluate the effect of hospitalization on medication patterns in the elderly. Method In-patients aged > 65 years included in the REPOSI registry during a recruitment period of 3 years (2008-2010-2012) were analyzed in order to evaluate drug use at hospital admission and prescription at discharge according to gender. Results A total of 3473 patients, 52% women and 48% men, were considered. Polypharmacy (> 5 drugs) is more frequent in men both at hospital admission and discharge. At hospital discharge, the number of prescriptions increased in both sexes at all age groups. Neuropsychiatric drugs were significantly more prescribed in women (p < 0.0001). At admission men were more likely to be on antiplatelets (41.7% vs 36.7%; p = 0.0029), ACE-inhibitors (28.7% vs 24.7%; p = 0.0072) and statins (22.9% vs 18.3%; p = 0.0008). At discharge, antiplatelets (43.7% vs 37.3%; p = 0.0003) and statins (25,2% vs 19.6%; p < 0.0001) continued to be prescribed more often in men, while women were given beta-blockers more often than men (21.8% vs 18.9%; p = 0.0340). Proton pump inhibitors were the most prescribed drugs regardless of gender. At discharge, the medication pattern did not change according to gender. Conclusion Our study showed a gender difference in overall medications pattern in the hospitalized elderly. Hospitalization, while increasing the number of prescriptions, did not change drug distribution by sex.