Ashley Gorley explained in Nashville Songwriter: The Inside Stories Behind Country Music's Greatest Hits:
by Jake Brown the song came together during one of his semi-regular songwriting sessions with Dallas Davidson and Kelley Lovelace. "Kelley is great at ideas; he had brainstormed some ideas," he recalled. "He had a titled called 'Wastin' Moonlight,' actually, which we all kinda liked … I was on the piano I think, Dallas was kind of strumming along … As it was kind of going down, we just started playing with different melodic flows, different phrasings, different ideas about going to pick up the girl and the fact you want the night to last all night long."
The trio pieced things together changing "wastin' moonlight," to, "runnin' out of moonlight" which they thought sounded better. "A lot of those things are magical happy accidents," Gorley said with a laugh. "The best line wins."