The difficulty is that you are not guaranteed to have a kitchen, pans, access, etc. Most albergue bathrooms will have hot water, but it can run out during the pilgrim shower/clothes-washing crunch plus it’s never guaranteed to be hot enough for your purpose. The extension cord idea could work, but electrical outlets can be hard to come by in many of the older albergues and you certainly don’t want to create a trip hazard for when those early-risers leave in the dark mornings.
Private rooms (at the higher cost!) will generally have a plug or using a kettle coil to heat water cup by cup seem to be the most reliable alternatives