Another "trick" for making up songs on the spot is to use established patterns. Iin Homer's day, "Rosy Fingered Dawn" shows up more than once. I suspect that Lament for Boromir has some re-useable patterns in it, and the implication is that they might have come from previous dirges. Aragorn fought for both Rohan and Gondor ("Thorongil"...) and so has heard more than one lament in his day.
I also wonder-- with the Old English tendency to boast over a cup:
Ælfwine then said, he spoke with courage:
"Remember the times that we often spoke at mead,
when on the bench we raised up our boast,
saviors in hall, about hard battle;
Now may he who would be bold be tested.
( Battle of
Maldon )
Perhaps did Aragorn, Gimli, and Boromir talk and jest about such things? How many Gondorian songs did Boromir sing between Rivendell and Parth Galen? And did those songs affect their lament for him?
And I wonder also-- did warriors jest about how they want to be remembered? Ever written your own epitaph, or what you wanted it to be, as an exercise? I can imagine warriors doing the same thing. (Especially after reading 'Battle of Maldon, ' where such things come up often )