Willy-nilly dates back to the 17th century, meaning 'will i-nill i' (I am willing-I am unwilling), referring to a state of indecision or indirection. E.g 'he was forced to go to the dance, willy-nilly (whether he liked it or not) or 'they drove around willy-nilly'.
Topsy turvy dates back to the 16th century, based on 'top' and the 'terve' ( a medieval term that is now obsolete) which meant 'overturn'. So it generally refers to either the state of being upside down, e.g ' the cat is all topsy-turvy on the bed', or a state of disorder, confusion and chaos, e.g. 'Things are all topsy-turvy at work today'
The -sy and -vy in 'topsy turvy'(and perhaps the -lly in 'willy-nilly' have been added through a process called reduplication, in which sounds are repeated to add emphasis leading phrases such as these to sound more rhythmic and catchy.