It is the mixture of the two, but it is mainly the drug. A psychostimulant like dextroamphetamine or methamphetamine have side effects and properties which cause paranoia (can be extreme in certain cases), hallucinations, delusional thinking, feelings of power and immense self-confidence, anxiety, anorexia (total appetite suppression), aggression and irritability combined with the insomnia causes amphetamine psychosis. Insomnia or the sleep deprivation alone does not cause psychosis on its own (unless you're up for at least 10-14 days, which is hard to do without drugs and even then the psychosis wouldn't be severe schizophrenia like). I've been up for 5-6 days due to insomnia (no drugs taken) and I was completely fine. I was more irritable, fatigued, and usually had headaches and general body aches but nothing serious or schizophrenia like behavior. I believe it is more the drug than the sleep deprivation, but the two combined along with anorexia makes things worse, of course. But the drugs are the main cause.
The symptoms of acute amphetamine psychosis are very similar to that of the acute phase of schizophrenia.
I think the amphetamines are much more likely to produce psychosis (and a more severe psychosis state) than cocaine/crack, methylphenidate, and most other stimulants. This is due to their potency as psychostimulants. They are generally more powerful stimulants than cocaine/crack, methylphenidate, MDMA, ephedrine, selegiline, phentermine, etc.