According serious eating, the best way to make classic Boston Baked Beans is to bake them overnight. The extended time spent in the dry heat of the oven (compared to a slow cooker) allows for more evaporation and creates a caramelized crust on top. Some of the grains break down slightly, but this only adds to the structure of the dish as the molasses develops a rich complexity.
Unfortunately, Serious Eats also notes that leaving an oven on overnight poses a serious fire hazard. According TD kitchen, any unattended oven immediately becomes a safety hazard. If food or other materials are ignited inside the oven, they can start a fire that could easily spread. It is important to pay close attention to food while cooking so that fires can be put out quickly before they get out of control. Carbon monoxide poisoning is another risk present if you have a gas oven. Since Serious Eats requires 13 hours of cooking for proper baked beans, you’ll need to find a different method if safety is a priority. Martha Stewart recommends six hours of cooking, but there are plenty of slow cooker recipes as well. While we all want to prepare the most authentic and delicious food possible, this should never come at the expense of safety.