It is a stupid idea. Your tests weren't a smart idea either.
LEDs, like all diodes, are meant to be current driven.
The current in your tests was probably determined by the internal resistance of your power sources (5V supply and 9V battery) and the resistance of your ammeter.
I suggest using a high voltage buck switcher for driving them off rectified mains voltage.
Before you go designing one of these circuits, are you sure you have enough knowledge and experience to attempt such a thing?
Based on your tests, I would assume you are fairly fresh in electronics. Mains voltage can be deadly, if you don't know what you are doing.