What a great question! Thanks for asking it! Once we scientists get all serious and start doing all this heavy research, we tend to forget about asking questions like this!
I'd like to be able to tell you "yes" or "no" to answer your question, but I can't, exactly, so you're going to have to be a little patient, OK?
First of all, we have to define what "sleep" means. Here is the definition of "sleep" from the American Heritage Dictionary:

sleep:
1.a. A natural, periodic state of rest for the mind and body, in which the eyes usually close and consciousness is completely or partially lost, so that there is a decrease in bodily movement and responsiveness to external stimuli. During sleep the brain in human beings and other mammals undergoes a characteristic cycle of brain-wave activity that includes intervals of dreaming. b. A period of this form of rest. c. A state of inactivity resembling or suggesting sleep, unconsciousness, dormancy, hibernation, or death.

It's a long definition, but if you read it carefully, you'll see that "sleep" involves things like "consciousness" (which means being aware of what's going on around you, being able to think, and being able to have opinions and emotions), and a "brain." "a" and "b" in this definition from the dictionary, then, refer to big animals - as they say - like mammals (humans are mammals).

Secondly, we have to define what a "brain" is. Here is the definition of "brain" from the American Heritage Dictionary:

brain:
a. The portion of the vertebrate central nervous system that is enclosed within the cranium, continuous with the spinal cord, and composed of gray matter and white matter. It is the primary center for the regulation and control of bodily activities, receiving and interpreting sensory impulses, and transmitting information to the muscles and body organs. It is also the seat of consciousness, thought, memory, and emotion. b. A functionally similar portion of the invertebrate nervous system.

Notice that this definition talks about vertebrates (part a) and
invertebrates (part b).
Vertebrates are animals that have a backbone with a spinal cord inside it.
The major groups of vertebrates are the fish, amphibians, reptiles and birds,
and mammals. Invertebrates are animals that don't have a backbone; in fact, they
don't have any bones at all. They are usually much smaller than the vertebrates
for this reason (although some, like the
giant squid, can get to be pretty
big!!). Some of the well-known invertebrates are the sponges, corals,
jellyfish, worms (and there are LOTS of different kinds of worms!), leeches,
snails, slugs, clams, crabs, shrimp, insects, spiders, and starfishes.
Vertebrates have real "brains," the kind of brain you think of right away when
someone says "brain" - a big, bunched up wrinkled thing inside the skull that
is responsible for operating your body. Invertebrates (including worms) don't
have this kind of "brain." What they typically have is a bunch of nerves that
are bundled up together into one or more knot-like things called a ganglion. Ganglia (that's the plural of "ganglion") can't do the higher-function things that brains do, like thinking and having an opinion about something or getting mad at your teacher for giving you a spelling test (most worms don't get spelling tests, anyway, so this is OK!). What ganglia can help the invertebrate do, though, is sense things, like how hot or cold it is, how light or dark it is, how wet or dry it is, whether there is a possible mate nearby or a possible predator nearby or food nearby... that kind of thing. These kinds of things are called stimuli (which is plural for "stimulus"). When your worm gets a certain kind of stimulus, the ganglia help it respond to the stimulus - this is what controls what the worm does, and helps keep it alive. For example, you know how earthworms come out all over the sidewalk when it rains? Well, when it rains, the burrows the earthworms live in get filled with water. If they stayed there, they'd drown! The stimulus is water. The ganglia in the worm can sense that it is "too wet." So, they crawl out of the burrows, away from the water. This is the response. This kind of things in animals is called a "stimulus-response" (plants can do this too, actually, but that is a whole separate question, because they don't have a nervous system at all) phenomenon. And, it is, for most invertebrates, the extent of what their "brains" can do (although some invertebrates have more complex nervous systems and can be pretty smart - like squids!).

Now that you understand stimulus-response (I hope!), you should be able to tell that if the worm is not getting or responding to a stimulus, it is not doing anything (they don't read books, play video games, or go roller-blading, as far as I know). There are certain times of the day and night when there are lots of stimuli around: food, mates, water... and the worm is active, eating, mating, drinking; basically, just staying alive. When those day-to-day stimuli are not around, the worm is going to be pretty quiet, unless it is suddenly exposed to a new stimulus like a predator. You can see this when you lift up a rock in your garden. There are all these happy quiet bugs and slugs and worms and grubs and things lying there, and as soon as you pick up the rock they start wiggling or crawling like mad to get out of the light - light's a stimulus!

SO, if a "sleep" is defined as loss of consciousness and characteristic brain wave patterns (and closed eyes, for heaven's sake... worms don't have eyes!), AND a "brain" is defined as a big complex wrinkled, folded mass of nervous tissue inside a skull, then

NO
worms don't sleep

BUT, if "sleep" is defined as a period of inactivity (as it says under "c" of the "sleep" definition), AND the ganglia of invertebrates are considered to be a "brain", then

YES
worms sleep

Isn't science great? All we have to do is define things the right way, and we can avoid answering any questions at all!!

By the way, worms are really cool critters and make neat pets (I did my research for my Master's Degree in the Division of Worms in the Smithsonian Museum! You really have to get used to people laughing at you when you tell them where you work, let me tell you!). You can keep them in a small fish tank; fill it half or three-quarters full of good rich garden dirt, put in some earthworms (five or six for a small, 10-gallon aquarium), and just keep the dirt misted with water - that's it! Then you can do your own stimulus-response experiments on them. Pour water into the tank until the dirt is completely wet, and the water line is right up to the very top of the dirt. What happens? Shine a hot light on them. What do they do? Put good garden dirt in the left side of the tank and "bad" dirt (dirt with no minerals or nutrients in it, like sandy dirt or clay) on the right side of the tank. Which side of the tank do the worms stay in? There's all kinds of things you can do with them!

And there are an amazing amount of worms - lots and lots and lots of different
kinds. If you would like to learn more about worms, there's a really cool site
on the web you can visit: