Cut the ends off of each garlic clove and smash them with the side of your knife blade.
Pour 3 cups of heavy cream into the inner pot of the Ninja Foodi. Add thyme leaves, peppercorns, bay leaves, smashed garlic cloves, ¼-½ teaspoon of sea salt to the cream and stir. Turn on the sear/saute on high and bring the cream to a simmer. When you start to see bubbles, turn the Ninja Foodi off and let the cream sit so the spices infuse into the cream.
Butter your baking dish.
Peel and slice the potatoes very thinly. The ideal thickness will be between 1/16 and ⅛" thick. Using a mandoline will product the most consistent results, but you can do this with a sharp knife. If your potatoes are thicker, increase the pressure cook time to 15 minutes.
Thinly slice your leek or onion.
Begin layering your potatoes by lining the bottom of the baking dish with the potato slices overlapping about ½" until the bottom is covered. It usually takes about 1 potato to make a layer. Sprinkle with salt.
Add a thin layer of sliced leeks or onion.
Repeat this layering until you have used all of your potatoes. Reserve some leeks or onion slices for the top. You will end up with 7-9 layers of potatoes.
Pour the cream through a strainer to remove the spices and let sit until ready to use. Wash out the inner pot.
Cover your baking pan with foil or a silicone cover. Add 1 cup of water to the inner pot and place the baking pan on the rack in the low position. Put the rack into the Ninja Foodi and put on the pressure lid. Turn the valve to seal and set on high pressure for 10 minutes. *if your potatoes are thicker, increase the time to 12-15 minutes to ensure they are cooked through. When the time is up, immediate release the pressure.
Check for doneness by inserting a knife into the potatoes. The knife should easily go through the potatoes. If you meet any resistance, your potatoes are not done and you will want to pressure cook another 1-2 minutes.
Pour the cream over the potatoes just until the potatoes are covered. You may not use all of the cream. I push the potatoes down some to make sure most of them are covered. Cover the potatoes and place the pan on the rack in the low position. Bake at 325° F for 20 minutes.
Uncover and continue to bake at 325° F for another 15 minutes or until the top is brown and bubbly. Press down to allow the thin cream to come up to the top.
Add the remaining leek slices/onion slices and continue to bake at 325° F for another 5 minutes or until brown and bubbly. Remove the rack from the Ninja Foodi and let the potatoes cool for about 15 minutes. This will allow the cream to thicken.