I agree put fresh batteries in them. if they still go off randomly they could be bad but its unlikely that two would be bad like that, especially if you bought them new. Also change your furnace filters and check that the exhaust from your furnace is exhausting outside you might need a furnace technician to check that ! If you have an oil, coal or wood burning furnace it could be sensing particles of combustion from the furnace which means the furnace may need servicing.
If they are new detectors. Depending on how long they have been sitting around the batteries could be bad or a lot of new detectors have a plastic strip that must be pulled out so that contact can be made. That way the detectors batteries stay fresh