Horace Walpole coined it in a letter he wrote to Horace Mann in 1754. He said that he invented it in reference to the Persian fairy story The Three Princes of Serendip, whose heroes regularly discovered pleasant things that they weren't searching for.