Hi,
This is not a scientific answer, but in past years I've always seen that the Nios IDE is flaky when it calls nios2-download and nios2-elf-gprof in the background. We "solved" the issue by running the command you put in your post from the nios command shell.
It unfortunately didn't work all the time and it used to get stuck at times. If it does get stuck, just use ctrl+c to stop the program and launch it again until it works. I don't know exactly what's going on with nios2-elf-grof under the hood, but restarting the program a few times tends to work afterwards.