I tend to look at them with one eyebrow raised and say something like "So you're saying you want to take the demon flail from the dead gnoll?"
When they agree that yes, that's what they do, I say something like "OK", and then write a note to myself that they're now carrying a flail that contains a fragment of power from a demonic entity who likely either wants to corrupt them or wants to destroy them in revenge for killing a beloved follower.
When they go to use it I would probably remind them of where it came from and ask if they're sure. If they say yes I absolutely let them do it, cackle maniacally about it, roll a few dice, make a few notes and thank the Gaming Gods that my players like to give me so much adventure fodder to work with. Pretty soon they'll notice that the item brings a price with its power, as all good "cursed" items to in our campaigns. And that's pretty much how I'd treat any powerful magic item like that from a monster in the game - for the monster it's a magic item that carries no real downside to its use, but for a player character it's a cursed magic item that give power for a price.
(This is not a hypothetical either. In my current campaign one of the players picked up a "wicked looking dagger" from an orc when they were around 2nd level. It detects as magic and he's utterly convinced that this dagger has some malevolent purpose and has agonized over using it on a number of occasions when the party's fat was in the fire but he hasn't yet. He keeps thinking about taking it to a scholar to be examined but hasn't for reasons I haven't figured out. It was originally just an ugly looking dagger that I threw in for color, with a bit of minor necromantic magic around it because the orcs were working for a necromancer, but at this point I feel like I've got to come up with something truly awful for it to be because he's invested so much story into it over the years. IMO, when players willingly give you that kind of fodder you've got to use it.)