In general no, but there are some species of sharks that require movement to circulate water over their gills. NOVA had this question addressed to Dr. Samuel "Sonny" Gruber who responded as follows:
NOVA: Do sharks have to keep swimming to breathe?
Gruber: Several species do, including hammerheads and mackerel sharks.
Typically, pelagic sharks that never encounter the bottom are adapted
to swim all their lives. But the vast majority of sharks have a buccal
(mouth) pump and are not so-called "obligate ram ventilators." (Ram
ventilators like hammerheads and great whites must swim to pass water
over their gills.) So the answer is no, emphatically. There are even
some sharks with spiracles, holes on the top of their head that allow
water to enter their gill chambers when the mouth is on the bottom.
This is corroborated by science and educational websites online as well as in the biology textbooks such as "Biology of Sharks and Their Relatives, Second Edition."
The Wobbegong shark, a member of the carpet sharks family. As an ambush predator, the Wobbegong shark demonstrates this behavior by lying in wait on the ocean floor among rocks and other materials waiting for smaller fish to swim closer.