Percy B. Green, who penned "A History of Nursery Rhymes" in 1899, called this a "Charm Against Ghosts"…

There Are Four Corners to My Bed - English Children's Songs - England - Mama Lisa's World: Children's Songs and Rhymes from Around the World  - Intro Image

Notes

Green wrote:

"The Matthew, Mark, Luke, and John rhymes were well known in Essex in Elizabeth's time. Ady, in his 'Candle After Dark,' 1655, mentions an old woman he knew, who had lived from Queen Mary's time, and who had been taught by the priests in those days many Popish charms. The old woman, amongst other rhymes, repeated -

Matthew, Mark, Luke, and John,
The bed be blest that I lay on.

This was to be repeated yearly, thrice on Twelfth Night*, and it would act as a charm until the following year against evil spirits."

*The Twelfth Night is on January 5th, the night before the Epiphany.

*****

Here's another version from The Big Book of Nursery Rhymes (circa 1920) edited by Walter Jerrold:

Matthew, Mark, Luke, and John,
Bless the bed that I lie on!
Four corners to my bed,
Five angels there lie spread;
Two at my head,
Two at my feet,
One at my heart,
My soul to keep.

Listen

Here's the version of the rhyme in the recording below...

Safe in Bed

Matthew, Mark, Luke and John,
Bless the bed that I lie on!
Four corners to my bed,
Five angels there lie spread;
Two at my head,
Two at my feet,
One at my heart, my soul to keep.

Download

Read by Betty B.

Thanks and Acknowledgements

The illustration can be found in The Big Book of Nursery Rhymes (circa 1920) edited by Walter Jerrold (1865 - 1929) and illustrated by Charles Robinson (with some graphical editing of the above image by Lisa Yannucci).