Most of the time when I mixed different nuts in a bowl, I observed that the big Brazil nuts were always on top while the small peanuts settled near the base. No matter how you take it, if the big nuts are put at the bottom and then the small nuts are poured, then also after some time the big ones will come to the top. Will not the gravity attract those big nuts more and eventually will they not remain at the base? But it doesn't happen! 

I googled it and found the term Brazil-nut Effect but couldn't find any proper explanation. What is the physical explanation for this effect?

The process you describe is called granular convection$^1$. It happens because under random motion it's easier for a small particle to fall under a big one than vice versa.

Let's assume that all the particles are made of the same material so there are no density differences in play. If you agitate the particles then temporary voids will open between particles as they randomly move. These voids will have a size distribution with lots of small voids and few large ones because it takes much less energy to create a small void than a large void. Small particles can fall into small voids, but a large particle can move downwards only if a large void appears. That means it's more likely for a small particle to move downwards than a large one. Over time the result is that small particles move downwards more often than large particles and hence small particles end up at the bottom and large particles at the top.

This is not the lowest energy state, because the greatest packing fraction is achieved with a mixture of particle sizes. Separating the mixture into layers of roughly similar particle size will decrease its density and hence increase its gravitational potential energy. The sorting is a kinetic effect and the sorted system is in principle metastable.


$^1$ I've linked the Wikipedia article, but actually I don't think the article is particularly rigorous and you should Google for more substantive articles.

