You mean like the Star Spangled Banner? Francis Scott Key dashed that one off in a few hours.
What about The Battle Hymn of the Republic? That was dashed off in one night. America The Beautiful was written in an evening after the author vacationed out west and was astounded by the beauty of the mountains there.
And, if we are getting off the topic of patriotic songs, Marty Robbin's El Paso was written while he was driving along a highway one day. He pulled off the road to finish the song, because "he wanted to know how it would end.
There are plenty of songs that were written in one day. Sometimes the magic works.