Numbers 11: 5-6 is the only verse to mention melons. These verses contain reference to two plants that are problematical--cucumbers and coriander. Since cucumbers are unknown from the ancient Middle East, the word probably applies to the muskmelon. Muskmelons have been cultivated in the Middle East for millennia.
The other melon mentioned in this verse is the common watermelon. It is still grown on a large scale in the Middle East. While watermelons in Bible days were probably much smaller than the large melons grown in North America, they are the same plant. The seeds are often roasted and eaten as a snack food.
The widespread culture of melons may have prompted the accidental gathering of the poisonous gourds in II Kings 4:39. Both the watermelon and the gourd have somewhat similar looking vines that creep across the ground.