Were you keeping the penis moist? If he is not inside his sheath or a partner the penis can start to dry out after that amount of time. Easiest way to do this is very gently lick the penis all over, or cup your hand so as catch his own liquids and lightly wipe his own juices over his penis.
When you say you were stimulating him, were you holding him behind the knot or touching the penis shaft? The shaft is quite sensitive so you don't want to be touching that to much after his knot has grown to full size.
Generally the knot should deflate with or before the shaft. If the penis shaft has gone noticeably softer than the knot it "might" indicate the dog has experienced some discomfort or pain. Because both those things can cause the penis to soften before the knot.
While there is pressure behind the knot the knot will stay inflated until he has finished orgasming. And continued stimulation can extent that orgasm time and delay the shrinking of the knot, but once he starts to soften you should let him finish and slip back away.
So while he is still shooting liquid his knot is not going to shrink, so if he is still squirting he's not finished, so don't panic about him slipping back into his sheath until after no more liquid is being ejaculated from the penis. However if he has stopped cumming and he still doesn't slip back away after a minute or two, then would be the time to try and help him. You can get a big bowl of cool water (as in below his body temperature. But not to cold either, as that might hurt him if his penis is overly sensitive at this point.) just lift the bowl up under him so the penis gets submerged, take care not to bump the penis on the inside of the bowl to much. The water will help moisten things if he had started to get dry and sore. The cool temperature of the water will also help him to get soft naturally.
If all else fails you can apply a generous amount of lube to the back of the knot to help it slip back in by pulling the sheath forward. over the knot. this is a last resort though as it has a high likely hood of hurting him since the sheath opening is being stretched to the limit to slip back over the knot. Which is something it is designed not to do while he is erect.
I hope that helps.