A smoke detector may one day save your life, but in the meantime, it can occasionally be a nuisance, especially when it goes off for no apparent reason in the middle of the night.
Weak batteries are the most likely culprits when a smoke detector keeps going off. The smoke detector is trying to let you know that the time to change them is at hand. If you work away from home, it is possible the alarm is beeping during the daytime as well as at night; you just aren't home to hear it.
Dirt, hair and dust can interfere with the operation of the smoke detector and even generate false alarms. The manual contains detailed instructions on how to clean a smoke detector, but for most, simply running the vacuum cleaner brush over it can be enough.
It's obvious that cooking smoke can generate false alarms. However, false alarms can also be caused by nearby fluorescent lighting, steam from a hot shower and the smoldering ashes of a fireplace if the flue is closed too quickly after the visible fire goes out.