The item that does this is The Torn And Tattered Hide Skinned Off The Corpse Of An Ancient Lycanthrope. The effect isn't random but is based off of the in-game clock. The werewolf effect lasts from somewhere around midnight to 8am in game. I don't remember the exact times but it's around half an hour of real time while the game is in its night cycle.