Did Spain even HAVE a navy by Hawke's time?
The first period when British military could have had much contact with Spanish women was during the Peninsular War. Reinhard has got it right.
BTW another use of the same tune is for "Maids When You're Young". Musically it can't much predate 1800.