Make iMac remember monitor positions after restart
The obvious thing would be if the preference for your user that stores the setting is corrupt. 

To test this, turn off auto login, make a new user, log in to that user  and arrange the monitors as you like. Log out of the test user, restart the Mac and log into the test user. This will let you know if the system problem or if it's a user problem.