Bring a pot of water to a boil, add ramen noodles and cook until tender, about 3 minutes. Drain and set aside.
In a large skillet over medium heat, cook chopped bacon until crispy. Remove bacon bits and set aside, leaving bacon fat in the pan.
Add ground beef and diced onion to the skillet. Cook until beef is browned and onions are soft, breaking up meat as it cooks.
Stir in minced garlic and cook for one more minute until fragrant.
Add ketchup, mustard, and pickle relish if using. Season with salt and pepper. Mix until well combined and heated through.
Add cooked ramen noodles to the beef mixture and toss to coat evenly.
Preheat oven to 375°F (190°C). Transfer the beef and noodle mixture to a baking dish.
Sprinkle shredded cheese evenly over the mixture and then scatter the cooked bacon bits on top.
Bake for 15–20 minutes until cheese is melted, bubbly, and edges are lightly golden.
Remove from oven and let cool slightly. Top with diced pickles or green onions if desired and serve warm.