wie man sich bettet, so liegt man

Etymology
lit. 'as one beds oneself is how one lies'.

Proverb

 * 1) as you make your bed, so you must lie in it