A Glen Cove couple was stunned to discover that a 4-foot-long snake had taken residence in a baseboard heater — inches from their bed.

Lauren and Eric Feinstein found the California kingsnake in their bedroom earlier this month after their golden retriever, Maya, alerted the couple to their unwanted roommate.

“I noticed that our dog went to the corner of the room and started acting strange. I went over and saw the tail end of a snake going into the heat register and completely freaked out,” said Lauren Feinstein, 30.

The couple pushed their bed away from the wall and used a hook to pull the black-and-white snake out of the heater.

“I scooped it up, and it just kept coming and coming,” said Eric Feinstein, 32. “I originally thought that it was just some 12-inch garter snake. It was definitely much larger than I expected.”

After moving from Boston, the Feinsteins began living in the home in November. They said the snake belonged to the previous tenant, who told them the reptile had escaped from its tank over a year ago.

advertisement | advertise on newsday

The couple released the snake into the woods outside their home, wrongly thinking it was indigenous to the region.

The Nassau County SPCA searched unsuccessfully for the snake after being notified by the couple Monday, according to spokesman Gary Rogers.

“Though California kingsnakes are nonvenomous and commonly kept as pets, if you find one or any other snake in your home, it’s best to just try and contain it; call the SPCA for assistance,” Rogers said.

Anyone who sees the snake is asked to call Nassau SPCA at 516-THE-SPCA.