Preheat oven to 350°F (175°C).
Prepare the beans: In a large mixing bowl, combine the canned baked beans (with their sauce) and all the other ingredients: brown sugar, ketchup, molasses, mustard, Worcestershire sauce, paprika, black pepper, and chopped onion.
Add bacon: If using, stir in the crumbled cooked bacon for a savory touch.
Bake: Transfer the mixture to a baking dish and cover with foil. Bake in the preheated oven for about 45 minutes.
Uncover and continue baking: After 45 minutes, remove the foil and bake for an additional 10-15 minutes, or until the top is slightly caramelized and the beans are hot throughout.