Sludge grew out of Hard Core. everyone played blindingly fast... then the whole Grunge thing in Seattle (started before the bands broke with Nevermind), the Melvins played SLOW. for whatever reason that really caught on in the south, particularly Louisiana (it's also too fucking hot and humid to play fast there) and sort of launched away.

the Sabbath influence is undeniable, a byproduct of slowing down meant expanding influences, so the two genres are tied.

As for Stoner, again, zero historical research here, but i imagine it is an offshoot of doom with Sabbath's "Sweet Leaf".

This may not answer your question, but if you are interested to read my attempt to a history of the genres you can read it here: http://www.metalstorm.net/pub/article.php?article_id=1255. I'm not an expert of the genres so I'm not saying my attempt of describing it necessarily is fully correct. It is more based around research than my own listening experiences, unlike my other articles which are based on both.

Sludge is the meeting of doom and hardcore, why it was originally called doomcore.
Stonerrock has nothing to do with doom, while stoner metal I think could be seen as the meeting between stoner rock and doom.