He might have been prescribed certain drugs by his doctors (there were others besides Dr. Nick supplying Elvis with what he wanted) but the other stuff he was taking (specifically Dilaudid and Demerol and liquid cocaine) were reportedly given to him in amounts only used by terminal cancer patients..and no he did not have cancer. He had no business taking what he did. He took a lot of the stuff he took because he liked the "buzz" it gave him and if he didn't get what he wanted, he'd just go somewhere else.
As Dr. Nick stated in June or July of '73:
"I don't think Elvis is a medical addict anymore. I think he's a hard addict".
I think (and I may be wrong) the reason that the drug usage of Hendrix, Joplin and Morrison doesn't get as much coverage is because it seems that they covered their drug usage well and kept it from the media. The MM tried to also hide Elvis's drug usage but it became harder and harder for them to do by the time 1977 rolled around.