Firefighters were called to the home on Forest Road in Centereach after neighbors spotted the flames.
The two residents suffered smoke inhalation and were rushed to area hospitals with non-life threatening injuries.
It took about an hour to bring it under control.
Investigators from Brookhaven and the Suffolk County Police Arson Squad are trying to determine what caused the fire.
Get Eyewitness News Delivered