Preheat the oven to 325°F (165°C)
Pat the leg of lamb dry with paper towels
Trim excess fat if needed
Make small slits all over the lamb
Insert sliced garlic and rosemary into the slits
Rub the lamb with olive oil
Season generously with salt and black pepper
Place the lamb in a roasting pan
Add onions, carrots, or potatoes if desired
Roast until the internal temperature reaches your preferred doneness
Check for medium-rare at 135°F (57°C)
Check for medium at 145°F (63°C)
Check for well-done at 160°F (71°C)
Remove the lamb from the oven
Tent loosely with foil
Rest for 15 to 20 minutes
Slice against the grain
Serve warm
