Decay will breakdown the nitrogen in detritus and other non refractory organics in/on the rock to among other things,DOC(dissolved organic carbon), particulate organics and/ or ammonia, nitrite , nitrate and N2 nitrogen gas depending on the flow and whether oxic, hypoxic or anoxic conditions prevail at a given time in the process .
In some situations NO3 could be the end product to the water column . In some situations large or broken organic chains might be released which might be exported by skimming or gac or consumed by bacteria. In other cases ammonia or nitrite might be taken up directly by algae and corals.
In badly clogged pores anoxic conditions may develop with organic C present as detritus setting the stage for sulfate reduction and it's toxic by product hydrogen sulfide.
So it's not a given that a flow of NO3 from rock clogged with organic material will occur,in my opinion.
Obviously,ensuring the right flow patterns in the tank and ocassionaly blowing off the rocks and crevices to minimize detirus buildup down helps prevent all of these issues.
Phosphate on the other hand may also come free form the organics as they break down in clogged rock pores but even as inorganic /orthophosphate /PO4 species it sticks to even clean calcium carbonate rock surfaces, perhaps via a loosely binding adsorbtion to CO3 and equilibrates with the water overtime.