01 - Heat olive oil in a large skillet over medium heat. Add onion and cook 3 to 4 minutes until softened. Add garlic and cook 1 minute. Add ground beef, breaking it apart as it cooks until browned. Drain excess fat. Stir in tomato paste, crushed tomatoes, tomato sauce, oregano, basil, thyme, salt, pepper, and sugar. Simmer uncovered for 25 to 30 minutes, stirring occasionally, until thickened. Adjust seasoning as needed.
02 - In a saucepan, melt butter over medium heat. Whisk in flour, cooking 1 to 2 minutes until pale golden. Gradually whisk in warm milk, stirring constantly to prevent lumps. Add nutmeg, salt, and white pepper. Cook, whisking, until thickened and smooth, about 5 to 7 minutes. Remove from heat.
03 - Cook noodles according to package instructions until al dente. Drain and set aside on a clean surface.
04 - Preheat oven to 375°F. Spread a thin layer of meat sauce on the bottom of a 9x13-inch baking dish. Layer 3 to 4 noodles over the sauce. Spread 1/3 of the béchamel sauce over noodles, then 1/3 of the ricotta if using, 1/3 of the meat sauce, and sprinkle with 1/3 of mozzarella and Parmesan. Repeat layers twice more, finishing with béchamel and cheeses on top.
05 - Cover with foil sprayed with oil to prevent sticking and bake 25 minutes. Remove foil and bake an additional 20 minutes until golden and bubbling. Let rest 15 minutes before slicing. Garnish with fresh basil if desired.