Could have been squash vine borer, though in my experience those usually get the plant a bit younger than you are describing. If it was the SVB, there will be a large lesion in the stem a little bit above ground level, with sawdust like frass (droppings) on the ground next to it.
If you find this, come back here and type squash vine borer into the Search the Forum Keyword box and find tons written here about them. AKA zucchini root borer and if you put that in Search you will find even more posts. But I think watermelon aren't as vulnerable to the SVBs as squashes are.
Otherwise I think watermelon are susceptible to root knot nematode and sometimes to root maggots. If it is the nematodes, if you pull one of the affected plants you will find galls, round swellings, on the roots.