According to author J. K. Rowling , the idea for both the Harry Potter books and the character came while waiting for a delayed train from Manchester to London in 1990 . According to Rowling , the idea for both the Harry Potter books and its eponymous protagonist came while waiting for a delayed train from Manchester to London in 1990 .