I don't think you're stupid for feeling that way at all. The combination of medication you were on, and being taken care of when you weren't used to it, probably felt very different and comforting. Lots of people find comfort from being in hospital - there were times in my past that I think I felt that way to some extent.
That's amazing that you're now working in the same hospital. Well done.
You didn't mention wanting advice so disregard the next bit if you don't want it!
I think it's really important that you identified why you felt how you did about hospital - that you need to take time for you, to nurture yourself and hopefully be nurtured by others. Maybe this is something you could work into each day or week? Even if it's just making yourself a hot chocolate and curling up under your favourite blanket for half an hour each day. It may not be the same, but in some ways it's better, because you can do self-nurturing things pretty much any time you choose.