Most likely, they were a later addition to Macbeth made by theatre professionals always looking to utilize a popular song if it could serve their purposes. Of course there are other possibilities as well. Maybe Shakespeare wrote the songs, and Middleton incorporated them into his own play, of perhaps the lyrics were written by a member of Shakespeare's company who contributed to both plays.
The first song, "Come away, come away," occurs at the end of Act III, scene 5 of Macbeth. Here's how the song appears in Act III, scene 3 of Middleton's play:
WITCHES: Come away, come away,
Hecate, Hecate, come away.
HECATE: I come, I come, I come, I come,
With all the speed I may,
With all the speed I may,
Where's Stadlin?
STADLIN: Here.
HECATE: Where's Puckle?
PUCKLE: Here.
WITCHES: And Hoppo, too, and Hellwain, too;
We lack but you, we lack but you.
Come away, make up the count.
HECATE: I will but 'noint, and then I mount.
A spirit like a cat descends.
WITCHES: There's one comes down to fetch his dues,
A kiss, a coll, a sip of blood,
And why thou stay'st so long
I muse, I muse,
Since the air's so sweet and good.
HECATE: Oh, art thou come?
What news, what news?
MALKIN: All goes still to our delight,
Either come or else
Refuse, refuse.
HECATE: Now I am furnish'd for the flight.
FIRESTONE: Hark, hark, the cat sings a brave treble in her own language!
HECATE, going up: Now I go, now I fly,
Malkin my sweet spirit and I.
Oh, what a dainty pleasure 'tis
To ride in the air
When the moon shines fair
And sing, and dance, and toy, and kiss;
Over woods, high rocks, and mountains,
Over seas, over misty fountains,
Over steeples, towers, and turrets,
We fly by night, 'mongst troops of spirits.
No ring of bells to our ears sounds,
No howls of wolves, no yelps of hounds,
No, not the noise of water's breach
Or cannon's throat our height can reach.
No ring of bells, etc.
The other song, "Black Spirits," appears at the beginning of Act IV in Macbeth, which also has the famous "Double, Double Toil and Trouble" song. This fact has led some scholars to speculate that Middleton wrote that song as well, along with perhaps other passages in Macbeth. There's no external evidence for that theory, but lack of evidence has rarely stopped fans of Middleton from attributing all sort of things to him.
Whether "Black Spirits" was written by Shakespeare, Middleton, or someone else, here's how it appears in Act V, scene 2 of The Witches:
HECATE: Black spirits and white, red spirits and grey,
Mingle, mingle, mingle, you that mingle may.
Titty, Tiffin, keep it stiff in.
Firedrake, Puckey, make it lucky.
Liard, Robin, you must bob in.
Round, around, around, about, about,
All ill come running in, all good keep out.
FIRST WITCH: Here's the blood of a bat.
HECATE: Put in that, oh, put in that.
SECOND WITCH: Here's libbard's bane.
HECATE: Put in again.
FIRST WITCH: The juice of toad, the oil of adder.
SECOND WITCH: Those will make the younker madder.
HECATE: Put in; there's all, and rid the stench.
FIRESTONE: Nay, here's three ounces of the red-hair'd wench.
ALL: Round, around, around, about, about,
All ill come running in, all good keep out.
Regardless of who wrote the songs, the fact that two plays by different dramatists shared some of the same material probably tells us something about playwriting and theatre production during the Jacobean era. Authorship was complicated, and companies had few qualms about recycling material. When directors today incorporate modern songs into Shakespeare's plays, they might be doing something similar to what Shakespeare's own company did hundreds of years ago.