DD did this at the same age. We got her a toddler clock and she eventually understood that she would need to be in bed the clock told her otherwise.
Took us awhile to get the clock and to train her (2 weeks of training at 24/25 months). And between that she usually just got put back in bed repeatedly or made to lay in bed with us.
SAHM to Magnolia May (09/10), Luke Russett (04/13) and expecting 11/16. Wife and best friend to my airman.