Mix agar-agar powder with milk and sugar in a pot.
Bring to boil, stirring continuously.
Place drained nata de coco, if using, on the base of your pan (the same shape for the cake).
Pour agar-agar mixture slowly, covering nata de coco, then place your cooled cake on top of it, and pour the rest of the agar-agar mixture (trim the cake a bit so it end and front would be covered by the pudding as well).
Let it cool a bit before firming it in the fridge.