The 400x series are indeed pretty much identical apart from maximum reverse voltage. I only keep 4007s in stock for that reason, they are (not interestingly) more expensive than other 1n400x diodes if you buy them by the 100 or so.
The 1n4004 is nothing special, it's rated to 400 volts dc so it's just a very common type of mains rectifier diode. It is normal silicon, high forward voltage, slow response, and can probably be substituted for -anything- you can yank out of a mains rectifing circuit that can handle 1 amp.
Considering how cheap they are i'd just buy them, but if you are in a hurry and have some discarded PC power supply around you can surely take some diodes from that as an instant substitute. Just make sure to pull them from the mains voltage end and not the output, as those diodes are often rated at a lower reverse voltage and could be lower drop, but faster, shottky ones as well.
In the application shown here that does not matter at all, but in general you should take not of this in higher voltage stuff.