A Brooklyn man noticed a stranger staring at him as he dozed off on the subway early Friday – then woke up to find the grinning maniac had set him on fire.

“I was screaming in pain, and he was just standing there watching me burn, like he was enjoying himself,” victim Piotr Olszewski told the Post after leaving the burn unit at Weill-Cornell Medical Center.

The 30-year-old Greenpoint resident was heading home from his girlfriend’s apartment and boarded a northbound G train at around 2 a.m. A young man hopped on at the same time.

The new passenger was 18-year-old Christopher Jackson, whose police record includes busts for arson, authorities said.

“He got on with me and he was just staring at me nonstop,” Olszewski said. “I felt a little nervous, but still fell asleep.

Then as the train pulled into the Court Square station, he felt a burning sensation.

“I just woke up and felt mad heat,” Olszewski said. “Something was burning. I looked down and I saw I was on fire.”

Flames were spreading up his left arm, through his North Face jacket and Calvin Klein shirt. He started swatting the flames with his hands.

Jackson, meanwhile, was standing nearby talking on his cell phone. “I lit him on fire,” the teen shouted into his phone with a smile.

The train operator said he also overheard Jackson as he gloated over the phone. He closed the doors and waited for cops to arrive.

By the time they did, Olszewski had put out the flames.

Police arrested Jackson and charged him with assault, reckless endangerment, criminal mischief and arson.

Jackson has 10 prior arrests, including busts for damaging property by fire, reckless endangerment and assault, police sources said.

“Now I’m scared to get back on the train,” said Olszewski, who was released after treatment. “Thank God it wasn’t worse.”