You would need a BIOS upgrade. Check the product page for your motherboard on the Asus website, look at the CPU support list, it should list what CPUs are supported and what BIOS version is required for each CPU. If the 4790K is listed, upgrade your BIOS to the version listed, and then you should be in good shape.
But yes a 4790K will work on a Z87 board as the chip uses the 1150 socket.
There is no guarantee of that, Intel told manufacturers not to support Devil's Canyon on Z87 boards, but the manufacturers went against that and released BIOS updates. In any case, just because the physical socket is the same doesn't mean it will work.
-What is best in life? -To crush your enemies, see them driven before you, and to hear the lamentation of the women.