All Lie algebras in this question are finite-dimensional and defined over a field $k$ of characteristic $0$ which I'm happy to take to be $\mathbb{R}$ or $\mathbb{C}$.
Let$\DeclareMathOperator\gr{gr}$Let $L$ be a nilpotent Lie algebra. It is then filtered by its lower central series, and we have an associated graded nilpotent Lie algebra $\text{gr} L$$\gr L$. It is definitely not the case that $L$ and $\text{gr} L$$\gr L$ have to be isomorphic; see thisMalcev Lie algebra and associated graded Lie algebra MathOverflow questions for some examples.
Question: what kinds of conditions can I put on $L$ that ensure that it is isomorphic to $\text{gr} L$$\gr L$? E.g. if the field is $\mathbb{R}$ are the there geometric/topological/algebraic conditions on the associated simply-connected nilpotent Lie group that ensure this?