The phrase started up in the 1980s by teens in the United States. It's an offshoot of the use of the word "cool" that had been in existence since the 1940s. That usage was associated with the cool jazz movement of the 1940s, especially Charlie Parker's 1947 record Cool Blues.