Miley Cyrus was granted a three-year restraining order by a Los Angeles judge on Monday against a young man who threatened to kill himself unless she met him.