Eating in the Louvre, d'Orsay, or any major museum is forbidden. Many have nice cafes if you're hungry mid-visit.
Bring a small water bottle (allowed). Save snacks for the cafe break.
The Musée d'Orsay restaurant on the 5th floor is genuinely good and architecturally stunning. Reserve for lunch.