Like taking a little nap on the bus, train or plane? Turns out the person operating your vehicle of choice might feel the same way.

A survey of transportation workers about their sleep habits found that fatigue is common and affects their ability to do their job.

The survey conducted by the National Sleep Foundation found that close to a quarter of train operators and pilots reported that sleepiness has affected their job performance at least once a week.

It has also caused safety problems. Twenty percent of pilots reported making a serious error and one in six train operators and truck drivers said that they have had a "near miss" due to sleepiness.

Vigilance, sustained attention and quick reaction are crucial for transportation workers, said sleep researcher David Dinges of the University of Pennsylvania. All three abilities take a big hit when people are drowsy, he says. Sometimes, they may completely miss things.

"During that period, the brain sort of blinks, or goes into a micro-sleep, there are many names for it, but behaviorally, it is described as a lapse," said Dinges. "It has been shown that those lapses can occur unpredictably in an individual who is trying to monitor an environment, or a task like driving, or operating a vehicle."

He added that the effects get worse after a few days of not enough sleep.

"Once your sleep duration gets below the base sleep that you need to be alert, and for many people that's seven hours approximately, then you see cumulative deficits in attention, slowed reaction times, cognitive slowing building up across days," Dinges said.

Shift work and especially night work contribute to sleep deprivation, he said.