Heat oven to 400°F and lightly grease and 8- or 9-inch square baking pan. To prepare the custard: In a medium saucepan, stir together the eggs and the coconut milk and then mix in the sugar. Add the sweet potatoes and stir well. Bring to a gentle boil over medium heat, stirring often, until the sugar dissolves and the custard thickens a bit, 4 to 5 minutes.
Pour the custard into the prepared pan and bake for 30 to 40 minutes, until puffed and golden brown; a butter knife inserted in the center should come out clean.
Let it cool. Serve at room temperature, cut into small squares to eat with a fork or spoon.