Background and release
"Habits (Stay High)" was written by Tove Lo alongside Ludvig Söderberg and Jakob Jerlström, while produced by Söderberg and Jerlström under the production name The Struts. Initially, Lo signed a publishing deal with Warner/Chappell Music in 2011, and co-wrote songs for Icona Pop and Girls Aloud. She later released her debut single, "Love Ballad", in October 2012, which drew the attention from some music blogs. This encouraged her to start a career as an independent singer so she could record her most personal songs.
According to Lo, "Habits (Stay High)" is the song from Truth Serum (2014) that means the most to her because of its honest lyrics and extended writing process. Initially, the verses of the song were part of a poem written by Lo when she was going through a difficult time in a relationship. Later, Lo's boyfriend became part of a Buddhist movement but she refused to join, which led the relationship to an end. After that, she started using drugs and drinking in order to forget him. Months after the relationship ended, she was staying at a friend's apartment in New York City, during 2012's Hurricane Sandy. When the apartment lost electricity and heat, Lo went on to stay at her friend's studio in Midtown, New York City, where she wrote the chorus.
On 11 December 2012, she announced through her Facebook account that she did not get to finish some of the projects she was working on in New York and that she was collaborating in the studio with The Struts in Sweden. The singer decided to use the vocals she recorded for the demo on the song because her vocal performance "was really coming from the heart". The Struts co-wrote, produced and programmed the track, and additionally played the keys. Filip Runesson played the strings, with Lars Norgren mixing the song and Björn Engelmann mastering it. In an interview with Coup de Main magazine, Lo said that: "[While writing the song, I was thinking about] my way of getting through a hard time in 'the best' possible way. It's a big relief to just think 'fuck it all' for a while. We all have to be so perfect, and absolutely no one can live up to it." She later confessed to The Huffington Post that she recovered from the break-up after writing the song.
On 15 March 2013, the singer released the track, under the title "Habits". It was her second independently-released single, after "Love Ballad" (2012). The song drew the attention of music blogs, which gained Lo an online following. Welsh singer Marina and the Diamonds and New Zealand artist Lorde praised the song through their accounts. Subsequently, the recording was re-released under the title "Habits (Stay High)" on 6 December 2013 through Universal Music as the second single from Lo's debut EP Truth Serum, as well as the lead single from her debut studio album Queen of the Clouds (2014). It was made available for digital consumption in the United States on 14 January 2014. On 17 June 2014, it was sent to US contemporary hit radio. About the song's re-release, the singer explained in an interview with The Untitled Magazine that, after the attention the track gained from music blogs, she signed a record deal with Universal Music. Then, the label representatives decided to re-release it with proper promotion as they believe it still had commercial potential.