A doctor prescribed pain medication oxycodone for Prince under the name of the musician's friend in order to protect his privacy, a court document has revealed.

Prince was 57 when he was found alone and unresponsive in a lift at his Paisley Park home in Minneapolis on April 21 last year.

Post-mortem test results showed he died from an accidental overdose of fentanyl, a synthetic drug 50 times more powerful than heroin.

According to search warrants unsealed on Monday, authorities searched Paisley Park, phone records of Prince's associates, and Prince's emails to try to determine where he got the fentanyl that killed him.

The documents suggest Prince was struggling with prescription opioid addiction.

One affidavit says Dr Michael Todd Schulenberg admitted he prescribed oxycodone for Prince in the name of an associate of the singer "for Prince's privacy".

Dr Schulenberg has yet to comment on the documents.